前台:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="lianxi1.aspx.cs" Inherits="WebApplication1.lianxi1" %>
<!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>
<style type="text/css">
.style1
{
width: 151px;
}
.style2
{
width: 176px;
}
.style3
{
width: 197px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:GridView ID="GridView1" runat="server"
OnRowDeleting="GridView1_RowDeleting" DataKeyNames="pkID"
OnRowUpdating="GridView1_RowUpdating" OnRowCancelingEdit="GridView1_RowCancelingEdit"
OnRowEditing="GridView1_RowEditing"
style ="left:50px;vertical-align:middle;width:700px;height:200px;text-align:center"
AutoGenerateColumns="False" AllowPaging="true"
onpageindexchanging="GridView1_PageIndexChanging"
onrowcommand="GridView1_RowCommand">
<Columns>
<asp:CommandField ShowDeleteButton = "True" >
<ItemStyle Width="100px" />
</asp:CommandField>
<asp:CommandField ShowEditButton ="True" >
<ItemStyle Width="100px" />
</asp:CommandField>
<asp:BoundField HeaderText="姓名" DataField="Name" >
<ItemStyle Width="100px" />
</asp:BoundField>
<asp:BoundField HeaderText="性别" DataField="Sex" >
<ItemStyle Width="100px" />
</asp:BoundField>
<asp:BoundField HeaderText="住址" DataField="Address" >
<ItemStyle Width="200px" />
</asp:BoundField>
<asp:BoundField HeaderText="出生地" DataField="Born" >
<ItemStyle Width="200px" />
</asp:BoundField>
<asp:BoundField HeaderText="代码" DataField="Code" >
<ItemStyle Width="100px" />
</asp:BoundField>
</Columns>
<PagerTemplate>
<asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)
Container.NamingContainer).PageIndex + 1) + "页/共" + (((GridView)
Container.N