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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:20:14+00:00 2026-06-06T23:20:14+00:00

does using ~/ in a file path resolve to the root of the current

  • 0

does using ~/ in a file path resolve to the root of the current folder or the website?

I have a file structure as such:

\
->Folder
-->Page1.Aspx

->App_Themes
-->Theme1
--->Images
--->StyleSheet.css

->Includes
-->Footer.htm

Default.aspx
Default.master

I am using my default.master page for Page1.aspx and default.aspx. The master page uses <!-- #include file="includes/Footer.htm" --> . Then in my Footer.html i use paths for images such as : ~/App_Themes/Theme1/Images/Image1.png”.

The image will display properly in default.aspx but will not be found in Page1.aspx. I thought ~/ meant root of the website when used in a file path?

EDIT:

I was wrong, it is also not working in defaut.aspx. The path that was working is: /App_Themes/Theme1/Images/Image1.png.

  • 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-06T23:20:17+00:00Added an answer on June 6, 2026 at 11:20 pm

    It resolves to the root of the current web application, which may or may not be the root of the website as a whole.

    To understand the difference, see this article.

    As a general rule, when you’re creating a “website” or a “web application” in Visual Studio, you’re actually creating a “Web Application” in IIS speak.

    To further muddy the waters, Conceptually, the root of the website is an IIS “application” in and of itself, so you can publish your Visual Studio website/web application to the root of your website. In that case, ~/ will refer to the root of the site.

    If, however, you’ve got multiple Applications all running in one Site, then in each one the ~/ will refer to the root of that application.

    For example, say MySite.com has different applications

    • mySite.Com – Distinct app in Visual Studio, has general site content.
    • mySite.Com/shop has a shopping cart. This is a distinct app in Visual Studio, and a distinct IIS application.
    • MySite.Com/Support contains a separate, distinct application for customer support. Ticket submission, chat with a live operator, etc.

    In all of the above, mysite.com is the website. but the /* denotes the application. The ~/ will refer to

    • mySite.Com/
    • mySite.Com/shop/

    and

    • MySite.Com/Support/

    respectively

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

Sidebar

Related Questions

If I create some file using Path.GetTempPath() - does it automatically get deleted at
Where does Railo store files created by when using the file attribute? I.e. <cflog
I'm using Spring 3.0.5. I have all my static assets in a folder named
I'm using File::Spec on a Unix system to get the absolute path of a
Im using system events to control a program that does not have a applescript
Does using the ADO.NET Provider that a DB vendor wrote eliminate the need to
Does using Service Oriented Architecture (SOA) in a system mean it is a distributed
Does using the computer for something else while benchmarking ( with the Benchmark module
Does using a password twice when hashing it make it safer? My example is
2 questions: Does using MVC make it any easier to build 508/WAI compliant sites?

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.