G
Guest
Hi guys
I'm using a MasterPage for my website rebuild (vs2005, .net2, c#).
I want to be able to control the Title element, both on the MasterPage and
the Content pages. For example, on each page I want the following to appear
for the Title..
SITENAME - some page related title
Obviously, I could just code each page to have "SITENAME - " in, but I'm
trying to find a way of being able to do something like..
this.Title += "some page related title"
... where the "SITENAME - " part has been added by the MasterPage. Can't get
this to work though.. any ideas? If I add to the <title> element of the
MasterPage, then it gets over written by the content, and i end up with
"Untitled Pagesome page related title"
and if I add Page.Title in the MasterPage .cs, then that overrides the title
for the ContentPage, so I end up with
"SITENAME - "
Arrrrgh! Help much appreciated!
) While were on the subject, how can I
change metadata (keywords, description, etc) for each Content page? Can I
just do that directly from the .cs?
Cheers
Dan
I'm using a MasterPage for my website rebuild (vs2005, .net2, c#).
I want to be able to control the Title element, both on the MasterPage and
the Content pages. For example, on each page I want the following to appear
for the Title..
SITENAME - some page related title
Obviously, I could just code each page to have "SITENAME - " in, but I'm
trying to find a way of being able to do something like..
this.Title += "some page related title"
... where the "SITENAME - " part has been added by the MasterPage. Can't get
this to work though.. any ideas? If I add to the <title> element of the
MasterPage, then it gets over written by the content, and i end up with
"Untitled Pagesome page related title"
and if I add Page.Title in the MasterPage .cs, then that overrides the title
for the ContentPage, so I end up with
"SITENAME - "
Arrrrgh! Help much appreciated!
change metadata (keywords, description, etc) for each Content page? Can I
just do that directly from the .cs?
Cheers
Dan