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

  • SEARCH
  • Home
  • 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 6337519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:16:01+00:00 2026-05-24T19:16:01+00:00

I am in a situation where I have multiple ASCX files that are being

  • 0

I am in a situation where I have multiple ASCX files that are being added to an aspx page. Some of these files include the jQuery library. Depending on which ones are added the jQuery library may be included more than once.

I cannot add jQuery at the masterpage or some other level, it must be from the ASCX. The reasons for this are beyond the scope of this question, but if someone really wants an explanation I can provide one.

Is it bad to have jQuery added multiple times in an ASPX page? Is there a way to conditionally add a script to an ASCX page?

  • 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. Editorial Team
    Editorial Team
    2026-05-24T19:16:02+00:00Added an answer on May 24, 2026 at 7:16 pm

    in your ascxs you can do

    if (typeof jQuery == 'undefined') {   
       // load jquery 
       var script = document.createElement('script');
        script.type = "text/javascript";
        script.src = "path/to/jQuery";
        document.getElementsByTagName('head')[0].appendChild(script);
    } else {
      //already loaded
    }
    

    ref: check if jquery has been loaded, then load it if false

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

Sidebar

Related Questions

The situation: I have multiple classes that should each hold a variable with a
I have a situation with my MVC2 app where I have multiple pages that
Here's the situation: I have a custom TextBox control that contains multiple other TextBox
So here the situation. I have multiple strings that begin and end with a
I have a situation where I have multiple drop down lists that are hidden
I have an interesting situation - I have multiple properties on our system, some
I have a situation where I might have multiple instances of a program running
I have a simple parent-child situation where the parent can have multiple children. The
I have a situation where I return results with multiple rows. I'm looking for
I have the following situation: multiple virtual directories under same application pool in IIS

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.