The aspnetpager paging control lacks an object solution.

Source: Internet
Author: User

Aspnetpager is a good paging control, but it has a bug. I use version 6.0:

When there is not one page of data, bind the page and enter a value in the jump page text box. The "Missing Object" JS error will pop up.

Or the first query is bound to less than one page. If the subsequent query is greater than one page, the same error occurs when you enter a value in the text box. The reason is that JS does not load Paging

The aspnetpager paging control lacks objects. The modification method is as follows:

OnSource codeThe first sentence of the onprerender (eventargs e) method in the aspnetpager. CS FileCode: Modify as follows:

Protected override void onprerender (eventargs E)
{
// If (this. pagecount> 1) & (this. showinputbox = webdatapager. showinputbox. always) | (this. showinputbox = webdatapager. showinputbox. auto) & (this. pagecount> = This. showboxthreshold) // This is the original
If (this. showinputbox = webdatapager. showinputbox. always) | (this. showinputbox = webdatapager. showinputbox. auto) & (this. pagecount> = This. showboxthreshold) // This is the modified

.........

}

 

Then perform the compilation test. OK. I hope it will help you.

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.