Public Class WebForm1 Inherits System.Web.UI.Page Protected Sub GridView1_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GridView1.RowCommand If e.CommandName = "AddNew" Then Dim xId As String = DirectCast(GridView1.FooterRow.FindControl("txtFooterXID"), TextBox).Text Dim xName As String = DirectCast(GridView1.FooterRow.FindControl("txtFooterXName"), TextBox).Text Dim xBit As Boolean = DirectCast(GridView1.FooterRow.FindControl("txtFooterXBit"), CheckBox).Checked MsgBox(String.Format("xId={0}, xName={1}, xBit={2}", xId, xName, xBit)) End If End Sub End Class Public Class DataBaseReader Public Function OpenData() As DataTable Dim table As New DataTable table.Columns.Add("XID", GetType(Integer)) table.Columns.Add("XName", GetType(String)) table.Columns.Add("XBit", GetType(Boolean)) table.Rows.Add(1, "徳川家康", True) table.Rows.Add(2, "織田信長", False) table.Rows.Add(3, "豊臣秀吉", False) Return table End Function End Class