Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 50047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:31:56+00:00 2026-05-10T16:31:56+00:00

In my base page I need to remove an item from the query string

  • 0

In my base page I need to remove an item from the query string and redirect. I can’t use

Request.QueryString.Remove('foo') 

because the collection is read-only. Is there any way to get the query string (except for that one item) without iterating through the collection and re-building it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:31:56+00:00Added an answer on May 10, 2026 at 4:31 pm

    You’d have to reconstruct the url and then redirect. Something like this:

    string url = Request.RawUrl;  NameValueCollection params = Request.QueryString; for (int i=0; i<params.Count; i++) {     if (params[i].GetKey(i).ToLower() == 'foo')     {         url += string.Concat((i==0 ? '?' : '&'), params[i].GetKey(i), '=', params.Get(i));     } } Response.Redirect(url); 

    Anyway, I didn’t test that or anything, but it should work (or at least get you in thye right direction)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How would I use jQuery to redirect the page to teh base page +
I understand that I currently can't use <a onclick=alert('<%=TextBox1.ClientID%>') directly because I need to
In order to show a page I need to grab a lot information from
I need to extend the base template for a page in my Django application,
I need to redirect any Authenticated user to a specific page if they do
I have implemented horizontal page view. One base page and three swipe pages. The
I found many pages of my maintenance website inherits a base page which overrides
I'd like to check for the existence of the Session in a base page
Thus for used base class for some commom reusable methods in every page of
Is it possible to set a base url on a page with a relative

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.