Modify page title on every page in application

Discussion in 'ASP .Net' started by MattB, Jan 5, 2005.

  1. MattB

    MattB Guest

    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
    MattB, Jan 5, 2005
    #1
    1. Advertising

  2. MattB

    Saravana Guest

    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" <> wrote in message
    news:...
    > 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
    Saravana, Jan 6, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    1
    Views:
    445
    Steve C. Orr, MCSD
    Aug 10, 2003
  2. Replies:
    0
    Views:
    512
  3. Replies:
    1
    Views:
    531
    David
    Apr 24, 2007
  4. soonic
    Replies:
    11
    Views:
    1,767
    soonic
    Jul 27, 2011
  5. Russell
    Replies:
    2
    Views:
    275
    Russell
    Sep 13, 2004
Loading...

Share This Page