asp.net-page life cycle

Source: Internet
Author: User

WebForm Life cycle
browser = Web server =>iis=>isapi=>asp.net webform=> initialize page=> load view and post data =>page load Page load = Handle button Events-save data to viewstate=> render page into HTML returned to iis=> back to user browser


ViewState Advantages and disadvantages

(1) Advantages:

Less server resources are consumed (compared to application, session). Because view state data is written to the client computer.

easy to maintain. By default, the dotnet system automatically enables maintenance of state data.

because it does not use server resources, it does not time out, and it applies to any browser.

(2) Disadvantages:

performance issues. Because view state is stored in the page itself, if you store a large value, the speed at which the user displays the page and sends the page can still slow down. ViewState increases the size of the page sent to the browser and also increases the size of the returned form, so it is not suitable for storing large amounts of data.

Device restrictions. Mobile devices may not have enough memory capacity to store large amounts of view-state data.

Potential security risks. View state is stored in one or more hidden fields on the page. Although view state stores data in a hashed format style, it can be tampered with. If you view the page output source directly, you can see the information in the hidden domain, although the ViewState data is encoded and you can choose to encrypt it, it is safest to never send data to the client.




MVC life Cycle

Browser = Web server =>iis=>isapi=>asp.net mvc=> routing = Controller
The =>action method =>model processing, gets the value and returns the ViewResult view result =>iis=> returned to the user's browser.

Action Invoker is the action caller invoke action


HTTP Request page life cycle (this is too hard to memorize)















From for notes (Wiz)

asp.net-page life cycle

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.