G
Guest
Hi guys
I'm well into a project at the moment which uses a MasterPage. I'm also
using seperate code-behind files for each page (C#).
I just realised that the MasterPage doesn't give you a property to set Meta
Keywords. It's got Description and Title, but not Keywords.
Reading around on the web, I should be able to create a new class which
inherits from System.Web.UI.Page, and adds a new Property called
"MetaKeywords" or whatever.
I've created a class called BasePage (in the App_Code folder), which
inherits from System.Web.UI.Page, and now I've gone through all the pages .cs
files and changed their inheritance to "BasePage".
This compiles, but I still can't get to the public MetaKeywords property I
created. It doesn't come up in autocomplete in the @page directive, and gives
me a "Error parsing attribute. System.Web.UI.Page does not have a public
property named MetaKeywords".
The @page directives still contain the Inherits="" item, which refers to the
codebehind class (_Default, Contact Us, etc depending on the page). But all
the classes inherit from BasePage?!
If I change the Inherits= to "BasePage", it still says it can't find
MetaKeywords!
Please - what have I missed?!
Ta
Dan
I'm well into a project at the moment which uses a MasterPage. I'm also
using seperate code-behind files for each page (C#).
I just realised that the MasterPage doesn't give you a property to set Meta
Keywords. It's got Description and Title, but not Keywords.
Reading around on the web, I should be able to create a new class which
inherits from System.Web.UI.Page, and adds a new Property called
"MetaKeywords" or whatever.
I've created a class called BasePage (in the App_Code folder), which
inherits from System.Web.UI.Page, and now I've gone through all the pages .cs
files and changed their inheritance to "BasePage".
This compiles, but I still can't get to the public MetaKeywords property I
created. It doesn't come up in autocomplete in the @page directive, and gives
me a "Error parsing attribute. System.Web.UI.Page does not have a public
property named MetaKeywords".
The @page directives still contain the Inherits="" item, which refers to the
codebehind class (_Default, Contact Us, etc depending on the page). But all
the classes inherit from BasePage?!
If I change the Inherits= to "BasePage", it still says it can't find
MetaKeywords!
Please - what have I missed?!
Ta
Dan