End Sub
Private Sub DataGrid1_DeleteCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.DeleteCommand
Dim sql As String
Dim getdata As SqlDataReader
Dim mycmd As SqlCommand
Dim uid As String = DataGrid1.Items(e.Item.ItemIndex).Cells(0).Text
sql = "delete from bookinfo where bookid='" + uid + "'"
mycmd = New SqlCommand(sql, myconn)
myconn.Open()
mycmd.ExecuteNonQuery()
myconn.Close()
mycmd.Dispose()
Response.Write("<script>javascript:alert('删除成功!!!');</script>")
End Sub
End Class
点击用户登录后:
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>