How to remove query string in asp.net

Solved

Request.QueryString.Remove("Parameter-Name") just run the program only this code it showing the read only error.

use the below code 100% working

PropertyInfo isreadonly typeof(System.Collections.Specialized.NameValueCollection).GetProperty("IsReadOnly", BindingFlags.Instance | BindingFlags.NonPublic);
            // make collection editable
            isreadonly.SetValue(this.Request.QueryString, false, null);
            // remove
            this.Request.QueryString.Remove("Parameter-Name");

Comments

Popular posts from this blog

Add Image through base64 on PDF in itextsharp

how to insert text and tags at the cursor CKEDITOR