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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:03:59+00:00 2026-05-12T23:03:59+00:00

when specifying the src of an img tag, must i convert the relative path

  • 0

when specifying the src of an img tag, must i convert the relative path to absolute? please post examples and why not use runat=”Server”

  • 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-12T23:03:59+00:00Added an answer on May 12, 2026 at 11:03 pm

    Because ASP.NET MVC views are in a separate folder, your best option is to use the

      <%= Url.Content("~/ImagesFolder/image.gif") %>
    

    to get the exact path of the image.

    All Url.Content does is return the exact path of a specific file using its relative url so it can be used for ANY file in your web application (.js .css .txt etc.).

    Alternatively, a better implementation for images is Html.Image() which is available in the MVC Futures (I can’t find the .dll link) and I think in the new version of ASP.NET MVC

    If you can’t find them, check out this post

    Where is Html.Image in ASP .NET MVC RC?

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

Sidebar

Related Questions

Is there any way of specifying a URI (rather than a physical path) as
should i use pt or px when specifying border-width in css for media print?
What is the best practice for specifying CurrentCulture or InvariantCulture and not specifying the
Is it possible in Eclipse to use a package that is not in the
When specifying Gradle project dependencies, can I avoid using a full absolute project name
Rather than specifying the id-path for components to click in WicketTester I'd like to
Rails.root returns a Path object specifying the root of a Rails project. Is there
Today we use the concurrent mark sweep specifying it like this: -XX:+UseConcMarkSweepGC I seen
When specifying summary tag comments, is there a way with the <param> tag to
I'm specifying font sizes in Ems, which means they're relative to the parent container.

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.