Re: using ~ (virtual path) with images
From: Pete Beech (peter_beech_at_hotmail.nojunk.com)
Date: 04/10/04
- Next message: Jason Coyne Gaijin42: "Re: The SqlParameter with ParameterName 'xxxxx' is already contained by this SqlParameterCollection."
- Previous message: Jason Coyne Gaijin42: "Re: Using one instance of SqlConnection in an ASP.NET page"
- In reply to: Brian Henry: "using ~ (virtual path) with images"
- Next in thread: Brian Henry: "Re: using ~ (virtual path) with images"
- Reply: Brian Henry: "Re: using ~ (virtual path) with images"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 11 Apr 2004 00:59:16 +0200
If I understand your situation right, it should work if you make sure the
<img> tag runs on the server, and then use the ~ notation to get to the
images subdir,
e.g. <img src="~/images/pic.jpg" runat=server>
HTH,
Pete Beech
"Brian Henry" <brian.henry[nospam]@adelphia.net> wrote in message
news:%237%23hluzHEHA.2928@TK2MSFTNGP10.phx.gbl...
> I made a header control in asp.net and it references images in the
/images/
> folder in the virtural path's root folder... How can I get the header
> control to show the images at any level of the web site? i got the
controls
> to load using the ~/tempates/ctrlHeader thing in the references section of
> the page that uses them, but I need that same idea in the actual control
so
> it knows to refrence the image folder no mater where the page its doing it
> from is located in the site... how can i do this? is there a way to use
the
> ~ in the img src? thanks
>
> example structure of this
>
> / root
> |--- images
> |--- controls for header etc...
> | -- main page.html
> |--- new pages in folder
> | --- sub page 1.. references control header and img
>
>
- Next message: Jason Coyne Gaijin42: "Re: The SqlParameter with ParameterName 'xxxxx' is already contained by this SqlParameterCollection."
- Previous message: Jason Coyne Gaijin42: "Re: Using one instance of SqlConnection in an ASP.NET page"
- In reply to: Brian Henry: "using ~ (virtual path) with images"
- Next in thread: Brian Henry: "Re: using ~ (virtual path) with images"
- Reply: Brian Henry: "Re: using ~ (virtual path) with images"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|