≡ Menu




How to get relative path for images in asp.net

One common problem developers face  while using master page that images did not get proper path, there are many ways to do this. But best way to use  ResolveClientUrl . For example :

<img src=”<%= ResolveClientUrl(”images/disco_night.png”)%>” alt=”Disco night” />

after rendering  it converted it as

<img src=”../images/disco_night.png” mce_src=”../images/disco_night.png” alt=”Disco night” />

{ 0 comments… add one }

Leave a Comment

Next post:

Previous post: