Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 181521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:46:42+00:00 2026-05-11T14:46:42+00:00

I have no issues when doing using JQuery in a aspx page without a

  • 0

I have no issues when doing using JQuery in a aspx page without a masterpage, but when I try to use it in pages that have a masterpage, it doesn’t work, so I end up putting the jquery files and other script files in the page instead of the master. Now if I have 10 pages, I am doing this for all 10, which I know is incorrect. In the sample masterpage below, where would I put my script files.

<html> <head runat='server'>     <asp:ContentPlaceHolder ID='head' runat='server'>     </asp:ContentPlaceHolder> </head> <body>     <asp:ContentPlaceHolder ID='ContentPanel' runat='server'>     </asp:ContentPlaceHolder>             </body> </html> 

I recently used the fancybox plugin and what I did was instead of putting the jquery script and fancybox scripts in the masterpage because I got frustrated on getting it to work, I just put it in the page where I wanted the script to run, specifically at the bottom, right before the closing asp:Content. Of course, now I have the issue of, if I wanted to use the fancybox plugin in other pages, I would put the jquery script and fancybox script on all 5 pages instead of just the masterpage. When dealing with masterpages, where does everything go using my example above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:46:42+00:00Added an answer on May 11, 2026 at 2:46 pm

    You would declare your main jQuery scripts within the master page, as you would normally:

    <head runat='server'>   <link href='/Content/Interlude.css' rel='Stylesheet' type='text/css' />   <script type='text/javascript' src='/Scripts/jquery-1.3.2.min.js'></script>   <asp:ContentPlaceHolder ID='head' runat='server'>   </asp:ContentPlaceHolder> </head> 

    And then any page specific JS files could be loaded within the Content controls that reference the Head ContentPlaceholder.

    However, a better option would be to look into the ScriptManager and ScriptManagerProxy controls – these can provide you with a lot more control over the way your JS files are served to the client.

    So you would place a ScriptManager control in you master page, and add a reference to the jQuery core code in that:

    <body>   <form id='form1' runat='server'>     <asp:ScriptManager ID='ScriptManager1' runat='server'>       <Scripts>         <asp:ScriptReference Path='/Scripts/jquery-1.3.2.min.js' />       </Scripts>     </asp:ScriptManager> 

    Then, in your page that requires some custom JS files, or a jQuery plugin, you can have:

    <asp:Content ID='bodyContent' ContentPlaceholderID='body'>   <asp:ScriptManagerProxy ID='ScriptManagerProxy1' runat='server'>       <Scripts>         <asp:ScriptReference Path='/Scripts/jquery.fancybox-1.2.1.pack.js' />       </Scripts>   </asp:ScriptManagerProxy> 

    The ScriptManager allows you to do things like control where on the page scripts are rendered with LoadScriptsBeforeUI (or better yet, after by setting it to False).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 205k
  • Answers 205k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer UPDATE: I'd also put forward BufferBlock<T> from TPL DataFlow. IIRC… May 12, 2026 at 8:59 pm
  • Editorial Team
    Editorial Team added an answer No, the closest thing to what you want is SVG… May 12, 2026 at 8:59 pm
  • Editorial Team
    Editorial Team added an answer python-mode creates an inferior process via 'make-comint, which uses 'start-file-process,… May 12, 2026 at 8:59 pm

Related Questions

I've just started using NHibernate, and I have some issues that I'm unsure how
I have a database that has lots of data and is all neat, normalized
I have a string in PHP (came from some data source), which represents a
Does anyone have experience using makefiles for Visual Studio C++ builds (under VS 2005)

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.