ASP.NET C# – Retrieving an HTTP Request Parameter

In the C# code use the QueryString array within the Request object to retrieve request values.
In the example below the query string parameter named “parm” (no quotes) was received in the HTTP GET request.

Request URL:

http://www.example.com?parm=thisvalue

C# code:

String valu = Request.QueryString[“parm”];

The string valu would contain the value “thisvalue” (no quotes) after the statement above was executed.





This entry was posted in Web Development and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*