I use this with no problem in all of my pages (regardles of the folder)
[html]
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/rxbanner.JPG" AlternateText=" my alt text" />
[/html]
With that being said though, the ~ only applies when used in the .aspx page (the designer page) and not in C# code.
The ~ is a pre-compiler command that will get replaced at runtime with the url. It does not apply to the backend. (That means you cannot use it in Response.Redire ct() calls)
I recomend you make some kinda global method or something that will return the begining url you want. Inside that method you can either "hard-code" the /MyVirtualDirect ory/ or you can write up code devised to extract the virtual directory based upon the Request.Url
Comment