Error!
Success!

Retrieve the subdomain from a URL in C#

0
kicks

Retrieve the subdomain from a URL in C#  (Unpublished)

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.


Kicked By:
Drop Kicked By: