Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I get the absolute url for a file from c#-code?

The path should come from IIRF

I have the path "~/file.aspx" and I want
"http://www.mydomain.xyz/myapp/file"
Using IIRF
Posted
Updated 9-Nov-10 0:04am
v2

Server.Mappath(~/file.aspx)
Will return you full path.
 
Share this answer
 
 
Share this answer
 
Hi Lipsa,

You can get

C#
HttpContext.Current.Request.ApplicationPath;



Please do let me know, if you have any doubt.

Please provide "Vote":thumbsup: if this would be helpful, and make "Accept Answer" if this would be correct answer.:rose:

Thanks,
Imdadhusen
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900