How to maintain data across pages

Posted by Gsrinivas under ASP.NET on 9/9/2009 | Views : 2130 | Status : [Member] | Replies : 7
hi
suppose i have 3 aspx pages and first page having user personal details and second page having user professinal details and third page having the login details and sign up button.

so in this senario how can i get the first page data and second page data in the third page.

Thanks & Regards
Srinivas Reddy




Responses

Posted by: Vuyiswamb on: 9/9/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day Gsrinivas

There a lot of ways you can Achieve this.

1) Session Variables

2)Hidden Field


Thank you for Posting at DotnetFunda. Tell us if you don't understand

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Gsrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gsrinivas on: 9/9/2009 [Member] Starter

Up
0
Down
how can we maintain with hidden feilds . hidden feilds are page specific.

if suppose each page having 20 feilds then is this right to create that many session variables?

Thanks&Regards
Srinivas Reddy

Gsrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/9/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
That is a Good Question. HiddenFields are out of the Question sorry about that , what was thinking. Now the Session you can Maintain. But now the Page will be havier with that number of Sessions. I think you need to take another approach. can you please Explain the Sequence of your pages again. i will will think of something.

Thank you for posting at Dotnetfunda


Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Gsrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gsrinivas on: 9/9/2009 [Member] Starter

Up
0
Down
the page sequence is like this:

UserPersonalDetails.aspx--->This page having 20 feilds. user will fil the data and click the next button then he redirects to the anthoer page i.e.

UserProfessionalDetails.aspx--->This page also having some feilds and user will the details and click next button then he redirects to the another page i.e.

UserLoginDetails.aspx--->this page also having some feilds and user will the data and clicks the sign up button.

When user click on sign up button i want to insert all the details in database. so how can i get the data of UserPersonalDetails.aspx page and UserProfessionalDetails.aspx page

Thanks & Regards
Srinivas Reddy


Gsrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/9/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day Gsrinivas

I see what you want to do. The Solution is to Have a Wizard Control that will be in one Page. than having all this pages. Now you wont need a Session , you will access the values straight from the Control. look at this

http://msdn.microsoft.com/en-us/magazine/cc163894.aspx


http://www.dotnetbips.com/articles/c6a28be9-8511-4d41-b3b6-6287a48f828f.aspx

http://www.codeproject.com/KB/aspnet/Wizard_Control.aspx


http://www.dotnetheaven.com/UploadFile/rahul4_saxena/Wizard06062007024907AM/Wizard.aspx


If you put this control in an Update Panel it works Wonders and you will not need sessions and a lot of pages.

Thank you for posting at dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Gsrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rtpharry on: 9/9/2009 [Member] [MVP] Bronze

Up
0
Down
--- deleted --- replied to wrong thread!

Gsrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudhak on: 9/11/2009 [Member] Starter

Up
0
Down
Hi Srinivas

Build a DataTable and place all the fields into that

Then place the datatable into session

You will infact create only one session and cast it with datatable when trying to retrieve in another page where you want

No need to create that many sessions

Regards
Sudha


Gsrinivas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response