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#
Response.Redirect(Request.UrlReferrer.AbsoluteUri.Substring(0,Request.UrlReferrer.AbsoluteUri.IndexOf(‘?’)));EDIT
In fact, you can actually use:
Check it out on MSDN.