Retrieve value from an HTTP query string

2

I have a URL that returns an HTTP QueryString , and I need to retrieve the URL information and convert it to variables to query the database. In PHP just use $_GET[""] , now in C # I do not know how to proceed.

I'll give you an example to clarify.

I have the URL: http://html.net/page.php?name=Joe&age=12

I have to get the values "Joe" and "12" for a later query.

    
asked by anonymous 19.01.2015 / 18:10

1 answer

3

Try this and see if it works out.

string nome = Request.QueryString["name"];

string idade = Request.QueryString["age"];
    
19.01.2015 / 18:21