Click here to Skip to main content
15,910,886 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi can somebody tell me what is the use of "~" in the line below ?

HttpContext.Current.Server.MapPath("~") + "//Error.log";
Posted
Comments
Sergey Alexandrovich Kryukov 6-Jun-12 13:03pm    
Yes. Many. Users. Can. Tell. You. :-)
--SA

1 solution

Tilde indicates the root path name in a virtual path name relative to the Web site root. Please see:
http://forums.asp.net/t/1174329.aspx/1[^],
http://www.dotnetperls.com/mappath[^],
http://msdn.microsoft.com/en-us/library/system.web.httpserverutility.mappath.aspx[^].

—SA
 
Share this answer
 
Comments
Maciej Los 6-Jun-12 18:11pm    
Good answer, my 5!
Sergey Alexandrovich Kryukov 6-Jun-12 18:24pm    
Thank you, Maciej.
--SA

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