Hello Friends

Now a days i m creating one web application in asp .net which have a four master pages and also web application have a url rewrting code.

when you are working with mastre pages and url rewriting code where some fack virtual web directorys will be generates which is actual not exist but in your url it will be load.

when this kind of url structures you are working you may have a problem of image display because in master page you gave absolute path for the image source but when fack url will generates image will be not display on page because image not found the path where exact it was placed.

second problem arise when you have a master page which is place in diffrent folder and it`s child page is place in diffrent folder at that time image will not display on the child page so here is the simple solution for the all image path related problems.

<img src=”Img/Logo.gif”/>

Please replace above code to below code

<img src=”<%= Page.ResolveUrl(”~“)%>img/Logo.gif”/>

Enjoy Friends…

Tags: ,

This entry was posted on Tuesday, March 17th, 2009 at 8:30 am and is filed under .Net Emperor. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One comment

 1 

We reveal the kind of person we are to the extent that we let others identify with us. ,

October 22nd, 2009 at 5:00 pm

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment