Home > ASP.NET, EnableViewState > EnableViewState=”false”


In most of the application we develop one way or the other we display information to the user stating the result of the operation that was just invoked.

  • In particular with ASP.NET we frequently use the Label / Literal control to display the information in the page.
  • Once the information is displayed to the user on the subsequent operation we use to clear the Label message that was displayed.
  • We do this mostly in the Page_Load event.
  • By any chance if we overlook it, old message will confuse the user.
  • One quick trick to solve this problem is to set the EnableViewState attribute of the Label /Literal control to false.
  • By this ASP.NET won’t persist the previously displayed information and whatever message we want to display will be visible only one time.

I found this some of the page in SharePoint. Thought of sharing!

Categories: ASP.NET, EnableViewState
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: