Let\'s say I\'m hosting a website at http://www.foobar.com.
Is there a way I can programmatically ascertain \"http://www.foobar.com/\" in my code behind (i.e. witho
C# Example Below:
string scheme = "http://"; string rootUrl = default(string); if (Request.ServerVariables["HTTPS"].ToString().ToLower() == "on") { scheme = "https://"; } rootUrl = scheme + Request.ServerVariables["SERVER_NAME"].ToString();