Hi -
Anyone have experience with custom Page directive attributes? I created a public property in my base page class and simply adding it to the Page directive works if my aspx page uses the Inherits attribute. But it doesn't work with a code-behind. Any ideas?
/**** Base class ****/
class BasePage : System.Web.UI.Page
{
private string _show;
public string ShowHeader
{
get { return _show; }
set { _show = value; }
}
}
/*** ASPX page *****/
<%@ Page Language="C#" ShowHeader="True" %>
---------------------------------
Thanks,
Loading
AbhijitPosted Jul 19, 2006, 10:50 AM
After an extensive search, I came across Scott A's blog
http://odetocode.com/Blogs/scott/archive/2006/07/03/4762.aspx
It seems you must specify the CodeFileBaseClass attribute in the ASPX to make this work.
AbC