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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:58:01+00:00 2026-05-13T13:58:01+00:00

I am programming for the first time in ASP.NET. It’s proven to be very

  • 0

I am programming for the first time in ASP.NET. It’s proven to be very easy and I’m really enjoying it. One feature I like is that, within a web page, I can reference files from root by using the tilde (~) character and then the rest of the path. However, this does not seem to be consistent. For example, it works within the context of href, e.g.

<link href="~/css/StyleSheet.css" />

It doesn’t work with respect to src, e.g.

<img src="~/images/header.jpg" />

Why is this? Is there something I’m doing wrong. The inconsistency is annoying.

  • 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-13T13:58:01+00:00Added an answer on May 13, 2026 at 1:58 pm

    From my experience the ~ trick only works in server controls. If your img has runat="server" that should fix it.

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

Sidebar

Related Questions

I am playing around with ASP.NET MVC for the first time, so I apologize
C++ was the first programming language I really got into, but the majority of
First of all I have to admit that my programming skills are pretty limited
Ok! I'm ready to embark on some .NET development for the first time. I've
I have been programming with .NET 2.0 version for quite sometime and would like
We have a website that is based on C# and ASP.NET, I have a
this is my first time using Eclipse, and my first time programming in a
My first programming job introduced me to unit testing and the concept of mock
When I first started programming, I wrote everything in main. But as I learned,
I am taking my first steps programming in Lua and get this error when

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.