By madskristensen
via madskristensen.dk
Published: Sep 21 2006 / 17:33
Yesterday I had to come up with a method that retrieved the subdomain from the current web request on an ASP.NET website. I thought that the System.Uri class contained that information in an easy retrievable way, but no.
Here’s what I came up with instead. It still uses the System.Uri to find the subdomain.



Add your comment