1
Answer

Page Directive Attributes

Abhijit

Abhijit

18y
1.9k
1
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,
Answers (1)