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 251259
In Process

The Archive Base Latest Questions

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

I am trying to use the jquery library in ASP.NET in a subfolder called

  • 0

I am trying to use the jquery library in ASP.NET in a subfolder called “samples” with a masterpage that is located in the root directory. Presently the references to the jquery scripts are located in the head tag of the master page. If the page I am creating is also in the root directory, everything works fine. If I move the page to the “samples” subdirectory, the jquery breaks.

I can fix the problem by using something like the following in the head tag:

<script src="<%=ResolveUrl("~/js/jquery.js")%>" type="text/javascript"></script>

…but then I lose the ability to use jquery intellisense, because I am no longer directly connected to the file in design time.

So my quesiton is this: How can I use the jquery library on a .aspx page without losing connectivity to the intellisense when my page is in a subfolder and the master page is in the root?

  • 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-11T21:34:47+00:00Added an answer on May 11, 2026 at 9:34 pm

    simply use this:

    <script src="/js/jquery.js" type="text/javascript"></script>
    

    putting / before js do the trick. I always keep my css and javascript files in separate folders and use this tweak to rightly include them.

    for intellisense you can try this trick:

    <%if(true){%>
        <script src="/js/jquery.js" type="text/javascript"></script>
    <%}%>
    

    I’m not able to recall the source of this trick.

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

Sidebar

Related Questions

I am new to asp .net. I am trying to use the JQuery library
I am trying to use jQuery and Asp.net Ajax library. The jQuery code is
I am trying to use JQuery in my ASP.Net 2.0 website in this scenario:
I'm trying to use jQuery UI tabs much like a Master Page in ASP.Net.
I'm trying to decide whether to use a custom ASP.Net Ajax Extender or jQuery
I'm trying to use the simple modal jquery library on a page and the
I am trying to use the django's jQuery library as follows. domain is a
I am trying to use Telerik MVC extension with jQGrid in a ASP.NET MVC
I have been able to use Jquery with ASP.NET because I know where to
I'm trying to use the JQuery cookies library http://code.google.com/p/cookies/ But am not able to

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.