MasterPages, ViewState and web.config files

protected override void OnInit(EventArgs e)
        {
            // we use this so that we can set the enableViewState property in the web.config
            // although it sets it at the page level, it doesn’t pass it on to the master page
            this.EnableViewState = this.Page.EnableViewState;
            base.OnInit(e);
        }

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.