Asp.net Performance Optimization-Page Status

Source: Internet
Author: User

How to Improve the Performance of Asp.net pages

An important parameter for improving the performance of Asp.net pages-enableviewstate

As we all know, Asp.net is very easy to develop. One of the main reasons is that, when we develop Asp.net in vs. net, the page status will be automatically saved by default, so developers do not need to think of it as saving the page status.

However, it also has some defects, that is, if the page does not have a control to save the status, it will also save the status by default, and when there are many Web controls on the page, asp.net uses a lot of stuff to save the status, resulting in slow page loading. In this case, you can use the enableviewstate attribute of the page command to control whether the page status is automatically saved.

<% @ Page Language = "C #" codebehind = "index. aspx. cs" autoeventwireup = "false" enableviewstate = "false" inherits = "XXX. XXX. Index" %>

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.