It's funny that we seem to have exactly the opposite problem. I can see the
images while designing, but not browsing.
- Richard Hein
Hi Paul,
As for the html <img> tag's image source url problem, based on my local
test, the following style URL won't work no matter in design-time IDE or
runtime browser...
"/Images/myimg.jpg"
Actually, the "/Images/myimg.jpg" style url is an absolute path which means
the path is start from the IIS website (not asp.net site)'s root folder. So
if your application is directly under IIS site's root, named "MyApp" and it
contains an "Images" subfolder, the images in that folder's url should be:
"/MyApp/Images/xxxx.jpg"
That's why I mean the "/" began url will work only if we web application is
directly under IIS site(mostly this is not the case...)
For ASP.NET Image Server Control, because it can use the "~/..."
Application relative path which means start from the Applicaiton's root
dir, so it will work well. However, since normal html elemetn won't been
parsed by ASP.NET ruhtime so we can not directly use "~/...." path in
static html. To workaround this, we can embeded asp.net code inline within
the html <img ..> tag so as to specify Application relative path, for
example:
<img src='<%= ResolveUrl("~/Images/rand.jpg") %>' />
the out put at cilent side will be
<img src="/ApplicationPath/Images/rand.jpg" />
Also, as I've mentioned, the "/xxxx/xx" style Url means start from IIS
site, if you don't mind that we embeded the application's full path in to
the url string, you can also use this absolute style path.
If there're anything unclear or any other questions, please feel free to
post here. Thanks,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Richard Hein" <Auxon@noemail.noemail>
| References: <47B447D0-03A8-4501-B580-29E43629C1C2@microsoft.com>
[quoted text clipped - 46 lines]
| >
| > Paul.
Steven Cheng[MSFT] - 16 Nov 2005 14:23 GMT
Hi Paul,
Any progress on this issue? Does the suggestions in my last reply helps a
little? If there're anything else we can help, please feel free to post
here.
Thanks,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 125310623
| References: <47B447D0-03A8-4501-B580-29E43629C1C2@microsoft.com>
<uFe#$QH5FHA.3312@TK2MSFTNGP15.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
[quoted text clipped - 92 lines]
| | >
| | > I would like my masterpage to contain html img tags (as opposed to
net
| | > img
| | > server controls). This is to save overhead on my server.
[quoted text clipped - 16 lines]
| | >
| | > Paul.