datagrid| page
The test table is now set up in the database, with the fields ID, Code, Name, respectively;
Database links here is not specifically written, the database link and operation request I wrote in the AreaInfo.cs, the code will be used, here to declare
<%@ Page language= "C #" codebehind= "Update.aspx.cs" autoeventwireup= "false" inherits= "Client.Page.AreaInfo.Update "%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<HTML>
<HEAD>
<title>test</title>
<meta name= "generator" content= "Microsoft Visual Studio. NET 7.1" >
<meta name= "Code_language" content= "C #" >
<meta name= "vs_defaultClientScript" content= "JavaScript" >
<meta name= "vs_targetschema" content= "http://schemas.microsoft.com/intellisense/ie5" >
</HEAD>
<body ms_positioning= "GridLayout" bgcolor= "Ivory" >
<font face= "Arial" size= "3" ></font><font style= "Background-color: #ffffff" face= "Arial" >
</FONT>
<br>
<form runat= "Server" id= "Form1" >
<table id= "Table1" cellspacing= "0" bgcolor= "#6699cc" cellpadding= "1" width= "" border= "1" >
<TR>
<TD><b>test</b>
</TD>
</TR>
<TD>
<asp:datagrid id= "DG1" runat= "server" bordercolor= "green" width= "640" pagesize= "5" allowpaging= "true"
Onpageindexchanged= "Page_grid" borderwidth= "1" cellpadding= "3" autogeneratecolumns= "false"
Showheader= "true" visible= "true" oneditcommand= "People_edit" oncancelcommand= "People_cancel"
Onupdatecommand= "People_update" ondeletecommand= "People_delete" >
Font-size= "9" horizontalalign= "Center"/>
<itemstyle bordercolor= "" backcolor= "#FFFFF0" forecolor= "Black" font-name= "Arial" font-size= "8"
Font-bold= "False" horizontalalign= "Center"/>
<edititemstyle bordercolor= "" backcolor= "#FFFFF0" forecolor= "Black" font-name= "Arial" font-size= "7"
Font-bold= "False" horizontalalign= "Center"/>
<pagerstyle mode= "NumericPages" font-size= "8"/>
<Columns>
<asp:boundcolumn headertext= "id" readonly= "true" datafield= "id"/>
<asp:TemplateColumn>
<HeaderTemplate>
<b> Code </b>
</HeaderTemplate>
<ItemTemplate>
<asp:label text= ' <%# databinder.eval (Container.DataItem, "Code"). ToString (). Trim ()%> ' runat= "server" id= "Label1" name= "Label1"/>
</ItemTemplate>
<EditItemTemplate>
<asp:textbox id= "code" text= ' <%# DataBinder.Eval (Container.DataItem, "code"). ToString (). Trim ()%> ' runat= "server" width= "100%"/>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<HeaderTemplate>
<b> name </b>
</HeaderTemplate>
<ItemTemplate>
<asp:label width= "text=" <%# DataBinder.Eval (Container.DataItem, "Name"). ToString (). Trim ()%> ' runat= "server" id= "Label2" name= "Label2"/>
</ItemTemplate>
<EditItemTemplate>
<asp:textbox id= "