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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:25:11+00:00 2026-06-01T13:25:11+00:00

I have an asp.net application containing pages that lie in multiple folder. I have

  • 0

I have an asp.net application containing pages that lie in multiple folder. I have my .js files also in one “JS” folder and I have added their reference in head of master page like:

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

Now when I am on home page, the script loads fine. But when I am on some other page that is present in another folder(Physics for example), the path gets appended and hence I get the error:

Failed to load resource: the server responded with a status of 404
(Not Found)

Similar thing is happening for my image paths and <a> tags also.

Now I want to give paths with respect to root path something like:

~/JS/VerticalMenu.js

But this ~ is not taking me to the root of my application. Do I need to set where ~ should lead to? And if yes then where and how??

  • 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-06-01T13:25:12+00:00Added an answer on June 1, 2026 at 1:25 pm

    Try this:

    <script type="text/javascript" 
        src="<%=Page.ResolveUrl("~/JS/VerticalMenu.js")%>"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed an asp.net web application containing 40-50 pages. I have implemented logger
The ASP.NET web applications that I'm working on is using multiple web.config files. One
I have a Asp.net MVC web application, containing mostly text. I want to put
I have a ASP.NET application that we've written our own logging module for. My
I have an ASP.net Application that runs on the internal network (well, actually it's
We have an ASP.NET application that manages it's own User, Roles and Permission database
We have an ASP.NET application running at a customer site that uses ActiveDirectory for
I have an ASP.NET application. Basically the delivery process is this one : Nant
I have an ASP.NET MVC application that uses jQuery 1.3.2. On several of the
Let's say I have an ASP.NET web application. I create an aspx page that

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.