Link to home
Start Free TrialLog in
Avatar of cybernation989
cybernation989

asked on

Retrieving QueryString Information

This is not an exam or homework

You are in charge of receiving QueryString information for the page "MyPage.aspx", (e.g. "MyPage.aspx?UserName=Bob"). Which of the following reads the information from the QueryString and assigns the value to a label called "Label1" that has been added to the page?

1. Label1.Text = Server.QueryString("UserName")
 
2. Label1.Text = Page.QueryString("UserName")
 
3. Label1.Text = HttpContext.QueryString("UserName")

4. Label1.Text = Request.QueryString("UserName")
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

>This is not an exam or homework
I am sorry, but this looks too much like it, or like exam preparation.

you should be able to answer that by trying out, if necessary...
ASKER CERTIFIED SOLUTION
Avatar of Chandan_Gowda
Chandan_Gowda
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cybernation989
cybernation989

ASKER

At first I was going to say 2 but after checking out http://www.pcreview.co.uk/forums/thread-1273353.php I would have to say 4 Since I am new to asp.net please let me know what you think
befor assigning the query string to the label it should be converted to a string
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial