Dmitry Makovetskiyd
Dmitry Makovetskiyd

Reputation: 7053

Getting variables from the URL

I have a URL that looks like that:

"~/ControlPanel.aspx?x=usersName"

Now I want the master page to also be able to request the usersName:

string name= Request["x"];

Is it possible to do?

Upvotes: 2

Views: 156

Answers (1)

Muhammad Akhtar
Muhammad Akhtar

Reputation: 52241

you can get using Request.QueryString["x"];

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

Upvotes: 1

Related Questions