ResolveUrl Method

ASP.NET’s Control class which provide a wonderful method ResolveURL thats parse relative URL’s path and make it ready and fix URL into one that is readable and usable on the requesting client.
Using tilt sign ~ that makes control execute and search inside the application.
E.g.

wwwroot/images/joggee.jpg
reference path : “~/images/joggee.jpg”

 
Example:
 

 

<img alt=”” height=”7″ hspace=”6″ src=<%=ResolveURL(“~/images/index_40.jpg”) %> width=”4″ />

Rana

 

About these ads

One thought on “ResolveUrl Method

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s