Path so site root?

  • Thread starter Thread starter Jeff S
  • Start date Start date
J

Jeff S

How does one get the full path to the site root - but not from a
code-behind module? I need it in a helper class.

Thanks
 
Try looking into System.Web.HttpContext.Current.Request.ServerVariables().
That should have everything you need.

Matt
 
Thanks - this is what works:
string tempPath =
System.Web.HttpContext.Current.Request.ServerVariables["APPL_PHYSICAL_PATH"]
;
 
Back
Top