Click here to Skip to main content
14,544,361 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am having two pages incidentinfo.aspx and sms.aspx
Incidentinfo page has 20 text boxes, a dropdown and one send button.

If I fill all info and click next button it goes to sms.aspx page .On sms.aspx there is one grid and one back button if no information found for selected dropdown choice mess given as no info found... then there is one back button on sms.aspx if I click on that it again come back to incidentinfo.aspx page.. now I want whatever info I filled before going to sms.aspx page should be displayed so that I can only change dropdown value and again click on next button ..how to do this? I don't want to use Session variable as I would need 20 variables then..

Please help!
Posted
Updated 9-Sep-10 3:31am
v2
Comments
swetha890 28-Jan-13 2:21am
   
Hi...Even I'm trying to do the same thing..By anychance did u get the solution for it..I'm trying to use session+database..but its nt working out
Rate this:
Please Sign up or sign in to vote.

Solution 1

In any case you will have to use a "persistent" store. Easiest thing to do is to create a configuration class and store all information in that and put that class in the session state. What are your main concerns against using session state? Storing 20 variables in a session is not a problem at all.

Second option is to store the info in the querystring, but that's not very nice and probably not safe. You could also run into length issues with the maximum length of the querystring.

Third option is to use a database backend, but that's overkill.

Fourth option is to store the data in cookies, but if cookies are not enabled on the client you can't store the data.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Is there a need of two pages? Why don't we have a single page and has these two page's functinality/UI in two Panels on the same page. Show first one and hide second one initially, later hide info page panel and show sms one. This would be easiest, best from performance both server and client side and would take least coding to get the functionality you need.

Though, if you want to stick to two page thing then you need create an object model, store all the values of first page into it. When you go back to first page from sms page, get back data from the object and fill the controls back.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100