Interviews6 answers
What is syntax for implementing Query string in ASP .NET?
6 Answers
QueryString property of Request Object. When surfing internet you should have seen weird internet address such as one below. http://www.localhost.com/Webform2.aspx?name=Atilla&lastName=Ozgur
Keerthi VenkatesanPosted May 12, 2016, 11:44 PM EDT
Syntax:
To send single parameter to another page we need to write code like this:
"Requested Page URL" ? "Variable name" = "Value".
Example: Response.Redirect("Default2.aspx?UserId=SH531828");
Example to send multiple parameters to another page we need to write code like this:
Response.Redirect("Default2.aspx?UserId=SH531828 & UserName=Shraban");
ShrabanPosted Feb 4, 2016, 11:23 PM EST
To pass data from one page to another we use query string.Its basically a key value pair.Syntax is
Response.Redirect("Page2.aspx?id=1&name=test"); .On the second page we can get it as
string name=Request.QueryString["name"].ToString();
Rajeev PunhaniPosted Jan 27, 2016, 8:20 AM EST
QueryString property of Request Object. When surfing internet you should have seen weird internet address such as one below. http://www.localhost.com/Webform2.aspx?name=Atilla&lastName=Ozgur
Posted Jan 9, 2016, 1:43 AM EST
QueryString property of Request Object. When surfing internet you should have seen weird internet address such as one below.
http://www.localhost.com/Webform2.aspx?name=Atilla&lastName=Ozgur
Ravi PatelPosted Dec 30, 2015, 11:36 PM EST
The syntax for implementing Query string in ASP .NET is
Response.Redirect("Requested page.aspx ?"Key=value)
Sandeep KumarPosted Dec 29, 2015, 12:54 AM EST




