Effect display:
Two images are required:
Details Code : Code
<% @ 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 > No title page </ 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 " Performanceid = " MySQL " Autogeneratecolumns = " True " Runat = " Server " Allowpaging = " True " Pagesize = " 3 " >
< Pagersettings
Mode = " Nextpreviusfirstlast "
Firstpagetext = " Page 1 "
Previouspageimageurl = " Images/pageup.gif "
Nextpageimageurl = " Images/pagedown.gif "
Lastpagetext = " Last page " >
</ Pagersettings >
</ ASP: gridview >
</ Div >
</ Form >
</ Body >
</ Html >