How to get current page URL excluding query string parameters. My URL is like this https://mywebsite.com/myproject/detailspage?id=2812
I want to get only https://mywebsite.com/myproject/detailspage.
I tried this but not helped.
string path = HttpContext.Current.Request.Url.AbsolutePath;
string url = HttpContext.Current.Request.Url.AbsoluteUri;
Please any suggestions.