Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question help in querrystring?

    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

  • #2
    Regular Coder Nischumacher's Avatar
    Join Date
    Oct 2005
    Location
    Bombay, India
    Posts
    196
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Code:
    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
    - NS 666
    .net DEVILoper

  • #3
    New Coder
    Join Date
    Sep 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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???




    Quote Originally Posted by Nischumacher
    Code:
    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

  • #4
    Regular Coder Nischumacher's Avatar
    Join Date
    Oct 2005
    Location
    Bombay, India
    Posts
    196
    Thanks
    0
    Thanked 2 Times in 2 Posts
    it is Request.QueryString["a"]...
    NOT Request.QuerryString["a"]...
    - NS 666
    .net DEVILoper


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •