开发者

How to Apply Databind For Instant Update

How to apply databind, so that the recent updated value will be displyed instantly, as i press update button ?

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


Just re-databind your control. If you post your databinding code I can provide a better answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜