Page.ResolveUrl no images

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 лет назад
Hi, can somebody please help
im using visual web developer 2008 and expression web, Im having problems viewing images in design view, images with this shopping cart use' Page.ResolveUrl'
to specify the path to images, if i use a standard path like ~/images/rss.jpg, all is ok. Does anyone Know why i carnt see images if 'Page.ResolveUrl' is used?.  If i run it on localhost (in a browser) all is ok,
its just in design view. Thanks
15 лет назад
ResolveUrl fixes up urls that start with ~ and puts the applications relative root path in its place.

Think it has something to do with how the web server built into Visual Studio creates a virtual app path based on the project name. Have a look at this post, it may help you.

http://weblogs.asp.net/scottgu/archive/2005/11/21/431138.aspx

Hope that helps
15 лет назад
Ignore my last post.

Since Page.ResolveUrl will not be evaluated until the page is actually loaded, the images will not render in design mode.

Why is ResolveUrl used for all resources? What benefit does this have over normal ~/image.img syntax?
15 лет назад
Hi, thanks for reply,
Since Page.ResolveUrl will not be evaluated until the page is actually loaded, the images will not render in design mode- If i carnt see the images how do i design my design , do i remove Page.ResolveUrl and just have a standard path to the images during development?.
I thought it may have been an IIS /virtual drive issue, but i have never used "Page.ResolveUrl" so wasn't  to sure if this was the problem.
15 лет назад
For the images I cant really see the benefit, or need, to use page.resolveurl in this case. I would personally just change to a standard url for these images since using the tilde (~) will reference the application root anyway.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.