Tuesday, December 20, 2011

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” />For more info refer:

No comments:

Post a Comment