I want to remove the Querystring part from my Request.UrlReferrer.AbsoluteUri before the Redirect in C#.
For example, if you have got your
Request.UrlReferrer.AbsoluteUri = "http://localhost:8080/english/index_2011.aspx?logout=true"
Now I want to
Response.Redirect(Request.UrlReferrer.AbsoluteUri) without QueryString part (?logout=true")
Please suggest using C#
use Request.UrlReferrer.AbsoluteUri.ToString().Split('?')[0]
This should do the trick for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With