B
Bob
I created my own MasterPage class which inherits from
System.Web.UI.MasterPage and then added a public Organization string on it:
public partial class MyMasterPage : System.Web.UI.MasterPage
{
private String _organization;
public String Organization
{
get { return _organization; }
set { _organization = value; }
}
}
And then in my .master page I added the @Master directive:
<%@ Master
Language="C#"
CodeFile="mymasterpage.cs"
Inherits="MyMasterPage"
Organization="MyOrg" %>
However, this results in the following error:
Parser Error Message: Error parsing attribute 'oranization': Type
'System.Web.UI.MasterPage' does not have a public property named
'organization'.
When I remove 'Organizataion="MyOrg"' the page works. Does @Master support
custom public properties just like @Page does? If so, what am I doing
wrong?
Thanks
System.Web.UI.MasterPage and then added a public Organization string on it:
public partial class MyMasterPage : System.Web.UI.MasterPage
{
private String _organization;
public String Organization
{
get { return _organization; }
set { _organization = value; }
}
}
And then in my .master page I added the @Master directive:
<%@ Master
Language="C#"
CodeFile="mymasterpage.cs"
Inherits="MyMasterPage"
Organization="MyOrg" %>
However, this results in the following error:
Parser Error Message: Error parsing attribute 'oranization': Type
'System.Web.UI.MasterPage' does not have a public property named
'organization'.
When I remove 'Organizataion="MyOrg"' the page works. Does @Master support
custom public properties just like @Page does? If so, what am I doing
wrong?
Thanks