how to store 10 textbox control in session state in asp.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neelmukhopadhya
    New Member
    • Dec 2010
    • 23

    #1

    how to store 10 textbox control in session state in asp.net

    i am working on a web application. i have 10 textbox control, in the page and 6 check box control . i need to store all those values in a session. but storing such a big field value is nothing but to create more session values. but i dont want create more than one session variables. how should i do this.

    please help me.it is urgent.

    Neel
  • sanamkm
    New Member
    • Dec 2010
    • 5

    #2
    Hi,

    I think you cant maintain all these variables in one session

    OR

    just code like this

    Session["test"]="text1"+TextBo x1.Text+";"+"te xt2"+TextBox2.T ext+";"+..."+te xt10"+TextBox10 .Text"+";";

    And when you want to retreive first textbox value..

    find the indexOf(tetx1)
    Then take a substring from the indesx to the ";" symbol..
    Dont know it will work properly..Have a good day

    Comment

    Working...