2012-09-07

SessionState and ViewState in ASP.NET

Fine tuning ASP.NET applications is a very extensive topic. However, some features are enabled and may not be needed. For example, Session and ViewState are not really needed for simple pages (i.e. if your ASP.NET page is basically hosting a single page application in Silverlight). To do this, just open the .aspx (markup) file and add the last two attributes:

<%@ Page Language="c#" AutoEventWireup="true" CodeBehind="Foo.aspx.cs" Inherits="Acme.Foobar" EnableSessionState="false" EnableViewState="false" %>

Note: this is basically a repost from my previous blog.

No comments:

Post a Comment