Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Modify page title on every page in application

Reply
Thread Tools

Modify page title on every page in application

 
 
MattB
Guest
Posts: n/a
 
      01-05-2005
I'd like to preface every page in my application's title with some text.
I have what I think is a good idea on how to do this, but I'm not sure
how to refer to the current page from global.asax.vb.

My plan is to put some code in the Application_BeginRequest event in
global.asax.vb or in a user control that will be present on every page
that will add this text to the page title if it's not a postback.

My main problem now is finding out how (and if) I can access the title
of the page programatically.

Can someone point me to the right direction? I saw some reference to
javascript code to do this but if possible I'd really like to do in the
vb codebehind. Thanks!

Matt
 
Reply With Quote
 
 
 
 
Saravana
Guest
Posts: n/a
 
      01-06-2005
Check out this faq to know how to set page title programmatically
http://authors.aspalliance.com/kenc/faq5.aspx


--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com


"MattB" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'd like to preface every page in my application's title with some text.
> I have what I think is a good idea on how to do this, but I'm not sure
> how to refer to the current page from global.asax.vb.
>
> My plan is to put some code in the Application_BeginRequest event in
> global.asax.vb or in a user control that will be present on every page
> that will add this text to the page title if it's not a postback.
>
> My main problem now is finding out how (and if) I can access the title
> of the page programatically.
>
> Can someone point me to the right direction? I saw some reference to
> javascript code to do this but if possible I'd really like to do in the
> vb codebehind. Thanks!
>
> Matt



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm looking for html cleaner. Example : convert <h1><span><font>my title</font></span></h1> => <h1>my title</h1>… Stéphane Klein Python 2 03-30-2010 12:35 AM
Friendly Urls with page title in (eg. page-title.aspx) anthonykallay@googlemail.com ASP .Net 1 04-24-2007 08:25 AM
How 2 place page title into window title using sitemap in master page? bednar.tomas@gmail.com ASP .Net 0 11-30-2006 03:17 PM
Does anyone know the title of the first ever DVD title released? (UK/US) Mikey DVD Video 12 09-23-2006 07:14 PM
Fastest way to get a the string between <title> </title> Andreas Klemt ASP .Net 1 08-10-2003 01:58 AM



Advertisments