conn.Open()
Try
adp.UpdateCommand.Parameters("@subjid").Value = CStr(Request.QueryString("subjid"))
adp.UpdateCommand.Parameters("@type").Value = dd.SelectedValue
adp.UpdateCommand.Parameters("@topic").Value = TextBox1.Text
adp.UpdateCommand.ExecuteNonQuery()
Response.Redirect("subjman.aspx")
Dim fn As String
fn = CStr(Request.QueryString("subjid"))
fn = fn.Trim
Dim url As String = Server.MapPath(".") & "\" & fn & ".txt"
url=cstr(url).Trim
Dim sw As System.IO.StreamWriter
sw = System.IO.File.CreateText(url) sw.WriteLine(TextBox2.Text)
sw.Close()
Catch ex As Exception
Response.Write("修改时出现错误:" & ex.Message)
Finally
conn.Close()
End Try
Try
adp.UpdateCommand.Parameters("@subjid").Value = CStr(Request.QueryString("subjid"))
adp.UpdateCommand.Parameters("@type").Value = dd.SelectedValue
adp.UpdateCommand.Parameters("@topic").Value = TextBox1.Text
adp.UpdateCommand.ExecuteNonQuery()
Response.Redirect("subjman.aspx")
Dim fn As String
fn = CStr(Request.QueryString("subjid"))
fn = fn.Trim
Dim url As String = Server.MapPath(".") & "\" & fn & ".txt"
url=cstr(url).Trim
Dim sw As System.IO.StreamWriter
sw = System.IO.File.CreateText(url) sw.WriteLine(TextBox2.Text)
sw.Close()
Catch ex As Exception
Response.Write("修改时出现错误:" & ex.Message)
Finally
conn.Close()
End Try
解决方案 »
- ASP.Net WebApp项目发布后放在IIS上运行和直接放在IIS上运行有什么区别?
- .net后台连oracle,后台发过去的查询语句只能匹配数字无法匹配字符?
- 找一个临时开发人员,按天计算工钱,半个月时间
- GridView 的SqlCommand和SqlAdapter删除更新和插入
- 關於JavaScript使用Session的問題
- 能不能用JS修改WEB页面listbox或select里的某项?
- 水晶报表创建控件时出错?
- 一个比较有挑战性的问题,高手请进!
- Error:SQL Server does not exist or access denied,麻烦各位达人,谢谢,急
- mvc 错误页面
- 刚学WEB,请教下cache的基本问题
- linkbutton下面哪个下划线怎么去掉呢?
请检查文件是不是唯“只读”,再检查文件的路径。