相关代码如下:    Sub DataBindList()
        DadminsGrid.DataSource = OneClass.ShowData("select * from zProducts where sName<>'' order by id")
        DadminsGrid.DataBind()
    End Sub    Protected Sub DadminsGrid_DeleteCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DadminsGrid.DeleteCommand
        Dim intID As Integer
        intID = DadminsGrid.DataKeys(e.Item.ItemIndex)
        OneClass.Command("delete * from zProducts  where id=" & intID)
        DataBindList()
    End Sub
    Protected Sub DadminsGrid_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DadminsGrid.UpdateCommand        Dim txtsName As TextBox
        Dim strContent1 As String
        Dim strsName As String
        Dim intID As Integer        If IsValid Then
            intID = DadminsGrid.DataKeys(e.Item.ItemIndex)            txtsName = e.Item.Cells(1).Controls(1)            System.Web.HttpContext.Current.Response.Write(txtsName.Text)
            strContent1 = Request.Form("content1")
            strsName = txtsName.Text            OneClass.Command("update zProducts set  sName='" & strsName & "' ,sContenten='" & strContent1 & "' where id=" & intID)
            'System.Web.HttpContext.Current.Response.Write("update zProducts set  sName='" & strsName & "' , sContenten='" & strContent1 & "' where id=" & intID)
            'System.Web.HttpContext.Current.Response.End()
            DadminsGrid.EditItemIndex = -1
            DataBindList()
        End If    End Sub