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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:54:22+00:00 2026-05-15T05:54:22+00:00

I have a project called WebResources where I have all the JS files that

  • 0

I have a project called WebResources where I have all the JS files that I intend to use in 2 other projects (all three projects sit in the same solution).

I just spent 2 hours playing around with the file paths and VS just doesn’t see the JS file (unless I specify the full path with the drive letter).
Is there a trick to including javascript files relatively from other projects?

My file structure is something like:

Project1
  Default.aspx
Project2
WebResourcesProject
   /js
     testToInclude.js

No matter how I try to include testToInclude.js inside Default.aspx, VS doesn’t see it.

Any ideas?

  • 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-15T05:54:22+00:00Added an answer on May 15, 2026 at 5:54 am

    To include relatively a file like as an image, css or js, they should be placed in the same server.

    Let’s say your server root is http://localhost:8080/ , and you map each project to separate folders such as http://localhost:8080/WebResourcesProject/ and http://localhost:8080/Project1/ then you could include the js like this (from the default.aspx file):

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

    You can easily try that if you deploy your projects into your local IIS. If you’re using the development webserver that visual studio give us, it seems to be not that easy. If there is not any real need of having the projects separately or referencing files relatively, I would consider either merging them or making absolute references.

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

Sidebar

Related Questions

I have a .Net project called: Whatever.Web.UI: I use this project to put all
I use LINQ-SQL as my DAL, I then have a project called DB which
say that i have a project which lies in a folder called 'bin', and
in the tomcat6 server I have a project that contains a servlet, I called
I have a WinForm project that contains a form called MainUI. You can see
I have a Maven project called Utils that i'm working on. I also have
Say, I have a project called example.vcproj to which I have added files: 1.
I have a project called InversionOfControl . That project has a class called IOC
For various C++ library projects in VS2008 I have a sibling project called <libraryname>-Test
This is homework, just so that's mentioned. I have project called AdventCalendar, which is

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.