img src="~/"

  • Thread starter Thread starter RedHair
  • Start date Start date
R

RedHair

When use src="~/..." for a img server control will render a relative path to
client, is it possible to return a absolute path?
Otherwise, I need to assgin it with resolveUrl("~/...")
 
When use src="~/..." for a img server control will render a relative path
to
client, is it possible to return a absolute path?
Otherwise, I need to assgin it with resolveUrl("~/...")

Request.ServerVariables["APPL_PHYSICAL_PATH"].ToString();

should return the absolute path on the webserver to your app's virtual
root...

There are several other ways of doing the above...
 
I can assign the path to the control directly?
<asp:Image ImageUrl=".." />


Mark Rae said:
When use src="~/..." for a img server control will render a relative path
to
client, is it possible to return a absolute path?
Otherwise, I need to assgin it with resolveUrl("~/...")

Request.ServerVariables["APPL_PHYSICAL_PATH"].ToString();

should return the absolute path on the webserver to your app's virtual
root...

There are several other ways of doing the above...
 
Back
Top