Joao Livio { MIX ~ UP on USA}

Another Way to get a Domain URL

string domain = 
   
HttpContext.Current.Request.Url.Scheme + Uri.SchemeDelimiter +

   
HttpContext.Current.Request.Url.Host +
   
(HttpContext.Current.Request.Url.IsDefaultPort
        
? ""
        
: ":" + HttpContext.Current.Request.Url.Port);
Leave a Comment

(required) 

(required) 

(optional)
 

(required) 

If you can't read this number refresh your screen
Enter the numbers above: