Retrieve the subdomain from a URL in C#(madskristensen.dk)
submitted by
madskristensen(8565) 5 years, 8 months ago
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.
|category: ASP.NET
|Views: 89
tags:
ASP.NET Tips C# another
Everyones tags:
Your Tags: