Asp.net(c#)GridView分页时用图片显示上一页,下一页

发布时间:2007年09月26日      浏览次数:1952 次
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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>
<asp:SqlDataSource ID="mySql" ConnectionString="server=(local);uid=sa;pwd=123456;database=student;" ProviderName="System.Data.SqlClient"
SelectCommand="select * from score" runat="server" />
<asp:GridView ID="myGridView" DataSourceID="mySql" AutoGenerateColumns="True" runat="server" AllowPaging="True" PageSize="3">
<PagerSettings
Mode = "NextPreviousFirstLast"
FirstPageText = "第一页"
PreviousPageImageUrl="images/pageUp.gif"
NextPageImageUrl="images/pageDown.gif"
LastPageText = "末页">
</PagerSettings>
</asp:GridView>
</div>
</form>
</body>
</html>
免责声明:本站相关技术文章信息部分来自网络,目的主要是传播更多信息,如果您认为本站的某些信息侵犯了您的版权,请与我们联系,我们会即时妥善的处理,谢谢合作!