Tuesday, 9 June 2009

InvalidOperationException: HtmlPage_NotEnabled

Add this in Page_Loaded
==========================
if (DesignerProperties.GetIsInDesignMode(this))
return;



To avoid this problem, be sure to check if you use HtmlPage class in Page_Loaded.


If inside Page_Loaded you call another functions, make sure they do not call HtmlPage class. Otherwise, use the if statement I provided above.


Reference:
http://www.andybeaulieu.com/Home/tabid/67/EntryID/158/Default.aspx

No comments: