Professional Documents
Culture Documents
Session objectives
Sending and Receiving key value
pairs using Query string
Kumar S
http://www.guyfromchennai.com
System.Web.HttpServerUtility
Kumar S
http://www.guyfromchennai.com
Query string
Query string is used to pass values
from one page to another
Kumar S
http://www.guyfromchennai.com
Query string
This Query string can be retrieved
using Request.QueryString
Kumar S
http://www.guyfromchennai.com
Example
Response.Redirect(“Default2.aspx?
name=Raja&age=45”);
Attaching a query string to the end of the Url
string name=Request.QueryString[“name”];
In Default2.aspx get the value for the name key
int age=int.Parse(Request.QueryString[“age”]);
In Default2.aspx get the value for the age key
Kumar S
http://www.guyfromchennai.com
Session Summary
Sending and Receiving key value
pairs using Query string
Kumar S
http://www.guyfromchennai.com