You could get the IIS site name using the GetSiteName method. System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName(); The GetSiteName is introduced in the .NET Framework version 3.5. Related TutorialsHow to search XML content with XmlDocument in VB.NET How to apply styles to the TreeView node levels in ASP.NET How to transfer information between pages in ASP.NET using a query string in VB.NET. How to compare strings in ASP.NET How to search XML content with XmlDocument in C#