473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

absolute paths when using "View in Browser" on local port

I use the VS 2005 option "View in browser" to often view my web site. If I
have a link in there like:

<img src="/graphics/myimage.jpg">

This doesn't work even though the image is really there. I'm sure this has
to do with the fact that the page is being served out of the virtual
server/port that VS fires up to serve the page.

This seems bogus...I can't even see my content? Am I doing something wrong?
I've tried using stuff like ~/graphics/myimage.jpg, but that doesn't work
either.

Amil
Jul 16 '06 #1
1 1410
Hello Amil,

Typically you'll need it to be a relative path not a root path for this to
work. I usually do the ~/graphics/myimage.jpg trick, but that means that
the <img /needs a runat="server" in the tag.

HTH
Thanks,
Shawn Wildermuth
Speaker, Author and C# MVP
http://adoguy.com
I use the VS 2005 option "View in browser" to often view my web site.
If I have a link in there like:

<img src="/graphics/myimage.jpg">

This doesn't work even though the image is really there. I'm sure
this has to do with the fact that the page is being served out of the
virtual server/port that VS fires up to serve the page.

This seems bogus...I can't even see my content? Am I doing something
wrong? I've tried using stuff like ~/graphics/myimage.jpg, but that
doesn't work either.

Amil

Jul 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Joe | last post by:
I have an upload file operation in the web application. UploadForm.asp is the form, and UploadAction.asp is the form processing. //UploadForm.asp <FORM NAME="InputForm"...
18
by: Lorem Ipsum | last post by:
interesting! I just found a page in which Explorer's View Source does nothing! How did they do that?
1
by: dw | last post by:
Hello, all. I have a site that works fine when viewed in IE apart from the project in Visual Studio .NET 2003. However, when I right-click and do View in Browser, it tries to open it in the wrong...
2
by: | last post by:
I like the "view in browser" feature of vs.net: right click from an aspx page, and preview a working version of the page. I don't like how this can't be launched from the pages' codebehind. The...
5
by: jfinnell | last post by:
Hi I'm working with the beta version of this product. I place the web in my master page, then link to my other pages. Set them up. When I select view in browser to check what I have done...
0
by: Amil Hanish | last post by:
Earlier I had inquired as to why a normal <a hreftag didn't work when using the VS hosted site using a random local port. The more I think about it, this seems very wrong. Using the random port...
1
by: Nalaka | last post by:
I had ..... <%@ OutputCache Duration="5000" Location="Server" VaryByParam="none" %> Then I added "browser" <%@ OutputCache Duration="5000" Location="Server" VaryByParam="none"...
4
by: marcnz | last post by:
Hi, I am working for a company which as a MS SQL backend and Access as front end. We update automatically each access db on the user local machine when a new feature has become available. We...
4
by: python | last post by:
I'm looking at rewriting some legacy VB applications and am pondering which of the following techniques to use: 1. Browser based GUI with local web server (Browser + wsgiref.simple_server) (I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.