Live Chat Icon For mobile
Live Chat Icon

How to get URL without querystring

Platform: ASP.NET| Category: Basic


Dim stringUri As String = ''
Dim weburi As Uri = New Uri(stringUri)
Dim query As String = weburi.Query
Dim weburl As String = stringUri.Substring(0, stringUri.Length - query.Length)


string stringUri = ''; 
Uri weburi = new Uri(stringUri); 
string query = weburi.Query; 
string weburl = stringUri.Substring(0, stringUri.Length - query.Length);
Response.Write (weburl);

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.