-
Below code is used for removing the query string parameters from the collection of parameters-
Dim isreadonly As PropertyInfo = GetType(System.Collections.Specialized.NameValueCollection).GetProperty("IsReadOnly", BindingFlags.Instance Or BindingFlags.NonPublic)
' make collection editable
isreadonly.SetValue(HttpContext.Current.Request.QueryString, False, Nothing)
' remove
HttpContext.Current.Request.QueryString.Remove("uid")
HttpContext.Current.Request.QueryString.Remove("pwd")
HttpContext.Current.Response.Redirect(HttpContext.Current.Request.Url.AbsolutePath + "?" & Convert.ToString(HttpContext.Current.Request.QueryString))Rem
This blog is for .NET and related web technology, where you will find some really good and time saving answers which can help you to make your fundaas clear.
Thursday, February 16, 2012
Removing some querystring values from collection
Labels:
Querystring
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment