我用下面这段代码运行之后出现错误,请问是怎么一回事?
Dim f As File
If Not f.Exists(Server.MapPath("file/aa.txt")) Then
f.Create(Server.MapPath("file/aa.txt"))
End If
Dim objwrite As New StreamWriter(Server.MapPath("file/aa.txt"), True)
Dim a As String
a = content.Text
objwrite.Write(a)
objwrite.Close()错误提示:
该进程无法访问文件“E:\web\test\file\aa.txt”,因为该文件正由另一进程使用。 请各位前辈多多指教,在线等待
Dim f As File
If Not f.Exists(Server.MapPath("file/aa.txt")) Then
f.Create(Server.MapPath("file/aa.txt"))
End If
Dim objwrite As New StreamWriter(Server.MapPath("file/aa.txt"), True)
Dim a As String
a = content.Text
objwrite.Write(a)
objwrite.Close()错误提示:
该进程无法访问文件“E:\web\test\file\aa.txt”,因为该文件正由另一进程使用。 请各位前辈多多指教,在线等待
解决方案 »
- 请教套打程序的实现原理
- 我写的这句sql查询语句不知哪里出错了
- ASP.NET操作Cookies的问题(Bug or Not)
- 新网互联客户的聊天功能是怎样做的?
- 如何在vs.net2005中定义网页是绝对(Gridlayout)还是相对(Flowlayout)!在VS2003中有属性,怎么到了2005就没了啊?
- [馨郁星愿]CSDN的xdjm快来帮忙啊~~~~~~
- 怎样把一个字符转成其相应的ascII码?
- 请教,象动网论坛www.aspsky.net首页的论坛列表在aspx中如何做?
- 一个简单问题,如何获得http://server/.../myForm.aspx?content=text中的text值?
- 子页中如何显示母版页中隐藏的控件
- 我的vs.net一下子又不可以创建web应用程序了,返回的错误消息时“服务器返回到信息无效或不可识别”
- 提示“System.FormatException: 输入字符串的格式不正确”怎么办啊
f.Create(Server.MapPath("file/aa.txt"))
End If这一句后面加个
f.Close();
看一下.
Dim fs As IO.FileStream
fs=f.Open(Server.MapPath("file/aa.txt"), IO.FileMode.Append)
Dim objwrite As New StreamWriter(fs)
Dim a As String
a = content.Text
sw.WriteLine(a)
sw.Flush()
objwrite.Close()