This code seems to be getting the querystring from a HTTP Get...
HttpContext.Current.Request.QueryString.ToString();
How do I get the querystring from a HTTP POST?
The same way.
HttpContext.Current.Request.QueryString["somekey"]
Both GET and POST have querystring in the Request. Only POST has the form data.
You shouldn't be doing QueryString.ToString()
. That will evaluate ALL the keys in the NameValueCollection. You should be using the indexer to retrieve the key you want, or enumerating with the Keys property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With