Where to put page specific script in a page that inherits from a master page?

Discussion in 'ASP .Net' started by Eric, Apr 25, 2006.

  1. Eric

    Eric Guest

    I have a master page, and want each derived page to have a separate script
    associated with it. However, I'm not sure where to put the <script> tag. I
    tried putting it into the Derived.aspx inside the <contentPlaceholder> tag
    but that did not work. The script did not get emitted to the browser.

    Since I want each page to have a different script, I cannot just put the
    page specific script into the master page but where DO I put it.

    Here's what I'd like:
    MasterPage.master
    |
    -Derived1.aspx (with ScriptA)
    -Derived2.aspx (with ScriptB)
    -Derived3.aspx (with ScriptC)
     
    Eric, Apr 25, 2006
    #1
    1. Advertisements

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. Alex Nitulescu
    Replies:
    0
    Views:
    505
    Alex Nitulescu
    Feb 22, 2005
  2. Doug McCann
    Replies:
    1
    Views:
    1,399
    William Brogden
    Aug 5, 2004
  3. Nunux
    Replies:
    0
    Views:
    471
    Nunux
    Sep 4, 2003
  4. Zeba
    Replies:
    1
    Views:
    737
    Mark Rae
    Feb 22, 2007
  5. Nathan Sokalski
    Replies:
    25
    Views:
    1,848
    Nathan Sokalski
    Mar 4, 2010
  6. SerpentKiss2010
    Replies:
    0
    Views:
    2,747
    SerpentKiss2010
    Apr 6, 2011
  7. ton
    Replies:
    1
    Views:
    1,340
    Teemu Keiski
    Jun 24, 2007
  8. Christopher Nelson

    Where to put page-specific JavaScript

    Christopher Nelson, Feb 26, 2007, in forum: Javascript
    Replies:
    22
    Views:
    281
    Christopher Nelson
    Mar 2, 2007
Loading...