asp.net 文件读写

来源:互联网 发布:ds数据融合目标识别 编辑:程序博客网 时间:2024/06/05 06:59

write

        Dim sw As New StreamWriter(Server.MapPath("bbsindex.htm"))
        sw.Write(s)
        sw.Close() 

-------------------------------------------------------------------------------------------------------------

read

       Dim s As String
            Dim line As String
            Dim sm As New StreamReader(Server.MapPath("admin/bbsoptions.htm"))
            Do
                line = sm.ReadLine()

                s = s & line
            Loop Until line Is Nothing
            sm.Close()
            Me.Label1.Text = s

原创粉丝点击