如何应用数据绑定,以便在按下更新按钮时立即显示最近更新的值?
Dim cmd As New Data.SqlClient.SqlCommand
Dim con As New Data.SqlClient.SqlConnection(constr)
Try
Dim strSql As String = "UPDATE a1_admins SET ImageURL = '" _
& "~/admin/Image/" & FileName & "' WHERE EmployeeId =" _
& Label1.Text
'------------"
con.Open()
cmd.Connection = con
cmd.CommandText = strSql
cmd.ExecuteNonQuery()
Catch ex As Exception
Response.Write(ex.Message)
Finally
cmd.Dispose()
con.Dispose()
End Try
答案 0 :(得分:2)
重新对数据进行控制。如果您发布数据绑定代码,我可以提供更好的答案。