UpdatePanel--Asp.net Ajax refreshing pagination

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.