Monday, 29 December 2014

How to Remove items from the qury string after redirection

Today i will explain about the How to Remove items from the qury string after redirection.
Removing Items from QueryString.

For this we need to add following Using Statements in the Page.

using System.Collections;
using System.Reflection;




PropertyInfo isreadonly = typeof(System.Collections.Specialized.NameValueCollection).GetProperty("IsReadOnly", BindingFlags.Instance | BindingFlags.NonPublic);
// Editable
isreadonly.SetValue(this.Request.QueryString, false, null);
// remove the Item
this.Request.QueryString.Remove("QueryStringParam");








No comments:

Post a Comment