html代码:
<% @ Page Language = " C# " AutoEventWireup = " true " CodeFile = " dataGridChange.aspx.cs " Inherits = " dataGridChange " %> <! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " > < html xmlns = " http://www.w3.org/1999/xhtml " > < head runat = " server " > < title > 无标题页 </ title > </ head > < body > < form id = " form1 " runat = " server " > < div > & nbsp; & nbsp; </ div > < table style = " width: 618px; position: static; height: 195px " > < tr > < td style = " width: 100px " > </ td > </ tr > < tr > < td style = " width: 100px " align = " right " > < asp:DataGrid ID = " DataGrid1 " runat = " server " Style = " position: static; " AutoGenerateColumns = " False " Height = " 179px " OnPageIndexChanged = " DataGrid1_PageIndexChanged " Width = " 639px " AllowPaging = " True " PageSize = " 3 " OnDeleteCommand = " DataGrid1_DeleteCommand " > < Columns > < asp:BoundColumn DataField = " EmployeeID " HeaderText = " EmployeeID " ></ asp:BoundColumn > < asp:BoundColumn DataField = " LastName " HeaderText = " LastName " ></ asp:BoundColumn > < asp:BoundColumn DataField = " FirstName " HeaderText = " FirstName " ></ asp:BoundColumn > < asp:BoundColumn DataField = " Title " HeaderText = " Title " ></ asp:BoundColumn > < asp:BoundColumn DataField = " City " HeaderText = " City " ></ asp:BoundColumn > < asp:ButtonColumn CommandName = " Delete " Text = " 删除 " ></ asp:ButtonColumn > </ Columns > < PagerStyle Visible = " False " /> </ asp:DataGrid > & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; < asp:Label ID = " lblCurrentIndex " runat = " server " Style = " position: static " Text = "" ></ asp:Label > & nbsp; & nbsp; & nbsp; < asp:Label ID = " lblCount " runat = " server " Style = " position: static " ></ asp:Label >& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; < asp:LinkButton ID = " firstBtn " runat = " server " CommandName = " first " OnClick = " changePage_buttonclick " Style = " position: static " > 首页 </ asp:LinkButton > < asp:LinkButton ID = " proBtn " runat = " server " CommandName = " pro " Style = " position: static " OnClick = " changePage_buttonclick " > 上一页 </ asp:LinkButton > < asp:LinkButton ID = " nextBtn " runat = " server " CommandName = " next " Style = " position: static " OnClick = " changePage_buttonclick " > 下一页 </ asp:LinkButton > < asp:LinkButton ID = " lastBtn " runat = " server " CommandName = " last " Style = " position: static " OnClick = " changePage_buttonclick " > 尾页 </ asp:LinkButton > </ td > </ tr > < tr > < td style = " width: 100px; height: 61px " > & nbsp; & nbsp; & nbsp; </ td > </ tr > </ table > </ form > </ body > </ html >