Web. config settings:
<System. Web>:
<Httphandlers>
<Remove verb = "*" Path = "*. asmx"/>
<Add verb = "*" Path = "*. asmx "Validate =" false "type =" system. web. script. services. scripthandlerfactory, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
<Add verb = "Get, head" Path = "scriptresource. axd "type =" system. web. handlers. scriptresourcehandler, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "Validate =" false "/>
</Httphandlers>
<Httpmodules>
<Add name = "scriptmodule" type = "system. Web. Handlers. scriptmodule, system. Web. Extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35"/>
</Httpmodules>
<Compilation DEBUG = "true" strict = "false" Explicit = "true">
<Assemblies>
<Add Assembly = "system. Design, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a"/>
<Add Assembly = "system. Web. Extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35"/>
<Add Assembly = "system. Windows. Forms, version = 2.0.0.0, culture = neutral, publickeytoken = b77a5c561934e089"/>
</Assemblies>
</Compilation>
<Pages validaterequest = "false"> Add:
<Controls>
<Add tagprefix = "asp" namespace = "system. Web. UI" assembly = "system. Web. Extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35"/>
<Add tagprefix = "webdiyer" namespace = "Wuqi. webdiyer" assembly = "aspnetpager"/>
<! -- ********** Aspnetpager7.0 is used, therefore, you do not need to add ***************** to facilitate the subsequent pages -->
</Controls>
* ******************* Web. after the configuration is complete *************************
Page front-end:
<Div>
<Asp: scriptmanager id = "scriptmanager1" runat = "server"> </ASP: scriptmanager>
<Asp: updatepanel id = "updatepanel1" runat = "server">
<Contenttemplate>
Insert a datalist or another control to bind data as usual.
<Webdiyer: aspnetpager id = "aspnetpager1" runat = "server" horizontalalign = "center" width = "100%" showinputbox = "always" custominfohtml = "Page % currentpageindex %, % pagecount % page in total, % pagesize % entries per page displayed"
Onpagechanged = "inherit" numericbuttontextformatstring = "-{0}-" pageindexboxtype = "dropdownlist" pagesize = "2" showboxthreshold = "1" showcustominfosection = "Left"> </webdiyer: aspnetpager>
<! -- ********** Aspnetpager7.0 is used. You can set ************** based on your preferences. -->
</Contenttemplate>
</ASP: updatepanel>
</Div>
BackgroundCode:As usual, read data and bind it to the corresponding control (such as datalist!