dotnet / dotnet/dotnet-api-docs

Document query string variables for key without value becoming value without key

Open
#916 3 comments 0 reactions 0 assignees View on GitHub
area-System.Web dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

It is quite common to use URL query string keys without values for boolean flags, e.g. `?foo` rather than `?foo=true`. This page does not document how those are handled.

It seems that the returned `NameValueCollection` contains these key-only query variables as no-key/null-key values.

That also means multiple flags are returned as a comma separated list of values/query-var-keys as a string - which is suboptimal for handling such query variables, when more than one can occur.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: cb6855ee-43a7-3a40-bef2-8b455dd4443c
* Version Independent ID: 5b1274ec-c193-769c-986e-2c95852477d0
* Content: [HttpRequest.QueryString Property (System.Web)](https://docs.microsoft.com/en-us/dotnet/api/system.web.httprequest.querystring?view=netframework-4.7.2#System_Web_HttpRequest_QueryString)
* Content Source: [xml/System.Web/HttpRequest.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Web/HttpRequest.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.