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

  • Home
  • SEARCH
  • 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 6376887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:48:05+00:00 2026-05-25T01:48:05+00:00

If I call var nvc = HttpUtility.ParseQueryString(?foo=bar&baz=robots) I get back a NameValueCollection where if

  • 0

If I call

var nvc = HttpUtility.ParseQueryString("?foo=bar&baz=robots")

I get back a NameValueCollection where if I call ToString on it, I get back a query string.

var str = nvc.ToString(); //foo=bar&baz=robots....

If I create a new NameValueCollection, add stuff to it, and call ToString() on it, I don’t get back a query string.

var nvc= new NameValueCollection();
nvc["foo"] = "bar";
var str = nvc.ToString(); //default for Object.ToString()

Also there doesn’t seem to be a way to construct a NameValueCollection that acts as a query string editor. Is there one? If not, why? Being able to edit query strings is a pretty useful thing, but this functionality is totally hidden away in an obscure mode of some object most people don’t even know exists.

  • 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. Editorial Team
    Editorial Team
    2026-05-25T01:48:05+00:00Added an answer on May 25, 2026 at 1:48 am

    This is done by the internal HttpValueCollection class, which inherits NameValueCollection and overrides ToString().
    ParseQueryString() is the only public way to construct this class.

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

Sidebar

Related Questions

Can I call public method from within private one: var myObject = function() {
So I call this PHP script from the command line: /usr/bin/php /var/www/bims/index.php projects/output and
From this code I can call bmwCars.CopyToDataTable() as I expected. var bmwCars = from
From: http://ejohn.org/apps/learn/#2 Function.prototype.bind = function(){ var fn = this, args = Array.prototype.slice.call(arguments), object =
I call my JavaScript function. Why do I sometimes get the error 'myFunction is
I'm using the following function call: var filesfound = filterSplit.SelectMany( filter => folder1.GetFiles( filter,
Environment used: ASP.NET, jQuery I have the following AJAX call: var tempVar = JSON.stringify({plotID:currentId});
Let's say I have a C# class: class Foo { private List<Bar> _barList; List<Bar>
I'm getting the following exception when I try to call var log = LogManager.GetLogger(this.GetType());
Error recieved (Chrome): Uncaught SyntaxError: Unexpected token : Script, call: var frypeurl = 'http://www.draugiem.lv/say/ext/like_count.php';

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.