querystring
-
hi, how to use querystring. how to set and get query string. :-D
I will do my best? Integrated Solutions, Bikaner (Raj.), India
hello... you can set a query string by padding it to the url you want your user to be redirected to for example at page 1 =========
void button1_click (object sender , EventArgs e) { Response.Redirect("page2.aspx?username="+textbox1.text+"&password="+textbox2.text); }
now at page2 =========== you can access those query string data by accessing the query string request at the page2 as follows at page 2 ========void Page_Load(object sender , EventArgs e) { if(Request.QueryString["username"] != null && Request.QueryString["password"] != null) { //do something with those querystring values string username = Request.QueryString["usename"]; string password = Request.QueryString["password"]; } }
Human knowledge belongs to the world.