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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:04:48+00:00 2026-05-15T07:04:48+00:00

My website is organized in the following folder structure Root Pages CustomerManagement DepartMentManagement Script

  • 0

My website is organized in the following folder structure

Root
  Pages
    CustomerManagement
      DepartMentManagement
  Script
  UserControls

Now i have a user control inside userControl Folder. I have to use a external js file. So i use it this way

<script type="text/javascript" language="javascript" src="../Script/slider.js"></script>

My understanding is that since both are under root so i have used a single ..
Now what happens is that when this usercontrol is used inside DepartMentManagement it checks for script folder inside CustomerManagement as .. refers to one hierarchy above and script file is not found.Even using a ~ doesnot work.

I want to make this script path independent of the path where this control is used. I don’t want to move script reference code to the page as control requires script mot page.Please tell me how to achieve this.

  • 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-15T07:04:49+00:00Added an answer on May 15, 2026 at 7:04 am

    Try it like this

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

Sidebar

Related Questions

I have a problem. The structure for my website looks something like this. root
I have a jQuery problem... for a website using lots of picture (organized per
Here's the C# code directly from the website ( http://jobijoy.blogspot.com/2007/10/time-picker-user-control.html ) that everyone refers
I have a website organized like this : a server with all the code
I have a website for which I am building in categories which would work
I have a revision website, it has stuff for multiple school subjects. I am
I have tabs on the website: Cinema, Concerts, Clubs, Theatres, Children, Other. Each tab
If it is possible to read information from a website that is organized using
i have taken over a website that has tons of css files and lots
Hello everyone! I have a website which is http://www.urbanelementz.ca ... It's currently in development.

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.