...

View Full Version : help in querrystring?



hytechpro
02-07-2006, 07:00 AM
Hi all,

We can transfer the user input from one web page to other page by using cookies, session variables and querrystring.
Is it possible to store 2 variables in querrystring if yes plz tell how???
Incase of single I cando it as follows

Response.Redirect(“webform2.aspx?a=”+textbox1.Text);

It works well
Plz tell me what do do if I want more variables.

Thanx
Devs

Nischumacher
02-07-2006, 11:11 AM
Response.Redirect("webform2.aspx?a=" + textbox1.Text + "&b=" + textbox2.text + "&c=" + textbox3.text);
here a, b, c hold the values... and can be accessed like...
Request.QueryString("a"), Request.QueryString("b"), Request.QueryString("c")... respectively

hytechpro
02-07-2006, 01:29 PM
Yes i tried this but there is a problem when i access them
i am simply writing the values of a, b and c like this
Response.Write(Request.QuerryString["a"]+"\n"+Request.QuerryString["b"]);
suppose the values a=hi and b=devs
then output is like this

hi
&b=devs

required output is

hi
devs

what is wrong???






Response.Redirect("webform2.aspx?a=" + textbox1.Text + "&b=" + textbox2.text + "&c=" + textbox3.text);
here a, b, c hold the values... and can be accessed like...
Request.QueryString("a"), Request.QueryString("b"), Request.QueryString("c")... respectively

Nischumacher
02-07-2006, 02:15 PM
it is Request.QueryString["a"]...
NOT Request.QuerryString["a"]...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum