In ASP. NET, ispostback takes effect only when processing a single page.

Source: Internet
Author: User

Note that the ispostback design works only when processing a single page, because the ispostback attribute is reset when moving to other pages. Consider two pages, page1 and page2. Each page is a page_load event process and a button's buttionexcepclick event process. They all have a link to navigate to another page. First, run page1. Its page_load event will run, and the ispostback attribute will be on duty as false. Press the button on the page to run the page_load event process again, followed by the button#click event process. During the two events, the ispostback attribute value is true. Click the link on the page to jump to page2. The page_load event process on the page runs. The ispostback attribute value during this event is false. Now, click the link to go to work in page2 to directly return page1. The page_load event process on the page1 page will run again, but the value of this ispostback attribute is also false. The ispostback attribute only works on a single page, because it is not the first time the page is loaded. The following illustration describes the process in detail.

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.