Common, Global Web Page Control

Discussion in 'ASP General' started by Alex Maghen, Sep 25, 2003.

  1. Alex Maghen

    Alex Maghen Guest

    Let's say I am building a web site that will have many
    ASPX pages and I want to implement a lot of common page-
    level functionality globally (centrally). Examples
    include:
    * Setting the TITLE from central code.
    * Setting Style Sheet File (.CSS) for every page.
    * Inserting various user web controls on every page.
    * Inserting client-side JScript, etc. on every page.
    * etc.

    For some of this stuff, I guess I can create a web
    control that I put on every page (can such a component
    set its parents' TITLE and CSS attributes? Guess so).

    Also, I think I can put code into my Global.asax that
    will automatically insert HTML at the top of or bottom of
    every page sent out (this one seems very nasty to me).

    I want to know what the most elegant way is to do this
    and if there are any examples I could look at. One thing
    I had considered is, is there any way of maybe overrding
    the Page Class and then having my ASPX files be an
    implementation of THAT ("MyPage" class) instead of the
    base "Page" class? Anyway, how do I do this stuff?

    Thanks.

    Alex
     
    Alex Maghen, Sep 25, 2003
    #1
    1. Advertising

  2. Alex Maghen

    Ray at Guest

    http://www.aspfaq.com/5002

    Ray at work

    "Alex Maghen" <> wrote in message
    news:051901c38382$3d4ba2a0$...
    > Let's say I am building a web site that will have many
    > ASPX pages and I want to implement a lot of common page-
    > level functionality globally (centrally). Examples
    > include:
    > * Setting the TITLE from central code.
    > * Setting Style Sheet File (.CSS) for every page.
    > * Inserting various user web controls on every page.
    > * Inserting client-side JScript, etc. on every page.
    > * etc.
    >
    > For some of this stuff, I guess I can create a web
    > control that I put on every page (can such a component
    > set its parents' TITLE and CSS attributes? Guess so).
    >
    > Also, I think I can put code into my Global.asax that
    > will automatically insert HTML at the top of or bottom of
    > every page sent out (this one seems very nasty to me).
    >
    > I want to know what the most elegant way is to do this
    > and if there are any examples I could look at. One thing
    > I had considered is, is there any way of maybe overrding
    > the Page Class and then having my ASPX files be an
    > implementation of THAT ("MyPage" class) instead of the
    > base "Page" class? Anyway, how do I do this stuff?
    >
    > Thanks.
    >
    > Alex
     
    Ray at, Sep 25, 2003
    #2
    1. Advertising

  3. Alex Maghen

    MSFT Guest

    MSFT, Sep 26, 2003
    #3
    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. Reny J Joseph Thuthikattu
    Replies:
    1
    Views:
    562
    =?Utf-8?B?UHJha2FzaC5ORVQ=?=
    Dec 30, 2004
  2. Gordon Dickens

    Schema Design for common global element

    Gordon Dickens, Aug 4, 2004, in forum: XML
    Replies:
    4
    Views:
    365
    Gordon Dickens
    Aug 14, 2004
  3. Denny
    Replies:
    1
    Views:
    783
  4. John Reye
    Replies:
    28
    Views:
    1,375
    Tim Rentsch
    May 8, 2012
  5. Jason Mellone
    Replies:
    3
    Views:
    101
    Jurko Gospodnetić
    May 7, 2014
Loading...

Share This Page