TipsOnLips.net

Your .net tips and tricks source

About the author

Author Name is someone.
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010


How To: Get a root or virtual directory url

string applicationPath = Page.Request.ApplicationPath;

 

if (!Page.Request.ApplicationPath.EndsWith("/"))

  {

     applicationPath = string.Format("{0}{1}", Page.Request.ApplicationPath, "/");

  }

 

string helpUrl = string.Format("{0}{1}", Page.Request.Url.Scheme + "://" + Page.Request.Url.Authority + applicationPath, "Help/GlobalSearch.htm");

 


Categories: ASP.NET | C#
Posted by developer on Friday, July 24, 2009 12:53 AM
Permalink | Comments (1) | Post RSSRSS comment feed

Comments

Walter Germany

Thursday, July 22, 2010 9:31 PM

Walter

sagabindara salutes you all out there

Add comment


(Will show your Gravatar icon)

  Country flag


Loading