Save the data on prevoius page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shoukat
    New Member
    • Feb 2008
    • 1

    Save the data on prevoius page

    Hi ,

    I am new to web development. I have a preview.aspx which can show the data from Data_page.aspx. But when i come back to the Data_page.aspx all the data in controls (listboxs,calan der etc) gone.How i can save the state of the controls. So that i can read more data from user.

    Shoukat
  • int08h
    New Member
    • Apr 2007
    • 28

    #2
    if you are requiring input from user, you may consider the Wizard server control

    also, web page do not store any state itself, so you may store all data to session

    Session["MyKey"] = data;

    you can retrieve and encapsulate data to an ArrayList, and once back to data_page, load all data:

    ArrayList data = Session["MyKey"];
    TextBox1.Text = data[0] as string; //just for example
    //etc...

    Comment

    Working...