62,195
社区成员
发帖
与我相关
我的任务
分享
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
DataKeyNames="UserID" >
<PagerSettings FirstPageText="首页" LastPageText="尾页" Mode="NextPreviousFirstLast"
NextPageText="下一页" PreviousPageText="上一页" />
<Columns>
<asp:BoundField DataField="UserID" HeaderText="用户编号" InsertVisible="False" ReadOnly="True"
SortExpression="UserID" />
<asp:BoundField DataField="UserName" HeaderText="用户名" SortExpression="UserName" />
<asp:CheckBoxField DataField="Sex" HeaderText="男" SortExpression="Sex" />
<asp:BoundField DataField="Age" HeaderText="年龄" SortExpression="Age" />
<asp:TemplateField HeaderText="查看">
<ItemTemplate>
<a href='FormViewDemo.aspx?Id=<%#Eval("UserID") %>'>查看</a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>