Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieve GET variables from URL in ASPX

What's the easiest / standard way to retrieve the GET (in URL) variables passed to a .aspx (VB) page?

like image 390
Steven Avatar asked Jun 23 '09 16:06

Steven


2 Answers

You can use the following:

Example URL: http://www.whatever.com?hello=goodbye&goodbye=hello

string value = Request.QueryString("hello");

Value will be goodbye

or

foreach(string key in Request.QueryString)
{
    Response.write(Request.QueryString(key))
}
like image 118
Jonathan Mayhak Avatar answered Nov 04 '22 21:11

Jonathan Mayhak


Look at the Request.QueryString collection

like image 7
Clyde Avatar answered Nov 04 '22 21:11

Clyde