.net, programming

Get the root part of a domain in .NET

Need to get the .com, .us, .biz, etc. part of the domain name in .NET? Here’s how: Dim root As String root = Right(Request.Url.Host, (Request.Url.Host.Length) – InStrRev(Request.Url.Host, "."))Dim root As String root = Right(Request.Url.Host, (Request.Url.Host.Length) – InStrRev(Request.Url.Host, "."))

Continue Reading