How can I save a pages state and reaasemble it after navigating away?
-
Hi, I need to be able to save a pages state/appearance (in a database / text file) e.g. text entered in text boxes, grids selected index datakey, check boxes checked status etc. this is so that if a user revisits the same page in a session the page will appear as it did when they last visited it. This is all handled during postbacks but not if the user navigates away. it would be nioce if I could handle this without explicitly saving every change that a user makes on each control e.g. adding "onchange" code to every control and saving it each time a change is made. Does anybody have any ideas on how I could acheive this? Jim
-
Hi, I need to be able to save a pages state/appearance (in a database / text file) e.g. text entered in text boxes, grids selected index datakey, check boxes checked status etc. this is so that if a user revisits the same page in a session the page will appear as it did when they last visited it. This is all handled during postbacks but not if the user navigates away. it would be nioce if I could handle this without explicitly saving every change that a user makes on each control e.g. adding "onchange" code to every control and saving it each time a change is made. Does anybody have any ideas on how I could acheive this? Jim
-
How about creating a class that has properties for all your variables, and then filling it and storing it in the
Session
object?Thanks for your suggestion... but the data needs to be retained after the session has finished. This is so that the users can transfer their work to another user, swap PCs if theirs has crashed etc. At the moment I have added a method in Page Unload to loop through all the controls in the page and save their data to a database. Not sure its the most effective way. Jim