Solved

How to transfer all values from MultiView Form(TextBox, DropDown List, etc...) to another form

Posted on 2009-05-05
9
394 Views
Last Modified: 2013-11-26
Hi,

I have a simple multiview form (Default.aspx) which gets information from user/s and what i wanted to do is to have a button in the last tab of the multiview form (Default.aspx) that will redirect to another form (PrintForm.aspx   -   The PrintForm is like the collection of all tabs of multiview form placed into one form) with all the values collected from the multiview form..
Is this possible? (I'm a noob) I'd appreciate if  anyone can show me how it should be done.

I've attached my code for both Default.aspx and PrintForm.aspx.
Code-File---Default.docx
Code-File---PrintForm.docx
Default.docx
PrintForm.docx
0
Comment
Question by:jsuanque
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 12

Expert Comment

by:GuitarRich
ID: 24302449
I would create an entity class to hold all the values entered in the form and then store that class in the session when the print button is pressed. In the print form you can then retrieve the values from the session and enter the data on to the form in the Page_Load event.
Or if the data is going to be stored in the database, just pass an ID in the query string to the print form and get the data from the database when the print form loads.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24302828
I think it would not be a good idea to save everything to the session and transfer to different page. It will be a big overhead(obviously depending on what and how much data is being pushed to session). I think you should save everything to the database and then retrieve it in the print page. Otherwise, write it to a random file and pass the name of file to the print page.
0
 

Author Comment

by:jsuanque
ID: 24303063
Hello GuitaRich/ CodeCruiser,

Noted the overhead when pushig enough data in a session. But as per both your suggestion; my understanding is that there will be a save button in the Default page which strores all the data entered/selected by the user directly to database. Then will it be another redirected page or button which will give you option to print the form based on the content that was entered where the info will be fetched from the save data from the database? Seems very complicated for a noob:)) I mean theory wise it's easy but coding will be a nightmare for me since i don't have much experience...
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 12

Accepted Solution

by:
GuitarRich earned 125 total points
ID: 24303088
when the data is saved, you need to get the Id of the new record, this could be stored in a hidden field in the page and then used when the user clicks the button to print the page. To get it to the print page, just put it on the Url and use the Request.QueryString object to get the data back in the print form.
like this:
Response.Redirect("~/printform.aspx?id=" + idField.Text);
And in the print form:
string id = Request.QueryString["id"].ToString();
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24303153
If you are storing the data in the database anyway then it should not be a big problem. You just have to retrieve the data and display it on the printform page. You could also store the id in the session instead of passing it in querystring.
0
 

Author Comment

by:jsuanque
ID: 24304643
CodeCruise/GuitarRich,

My intent is to have less activity or interface from the user as much as possible. But your suggestion seems open ended from a noob's pont of view. I mean shall all the suggested activiy (i.e. save the data entered or selected from theform directly to database then show a form which has all those saved data in just one button? or shall it be multiple activities (e.g. button_click then redirect to new form then another button to populate it based on the id?)?

My apologies here....it's noob your speaking.
0
 

Author Comment

by:jsuanque
ID: 24304674
Code cruiser,

Your suggestion is very much intersting as well as GuitarRich. But i could probably get the picture more clearly if you could show some code :)
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 125 total points
ID: 24304692
You would have a Save button on first form. This button would save all the data to the database. Depending on your scenario, you could then directly navigate to print button or you could show a separate Print button to the user. Whichever way, on the page loading of the print page, you would use the ID to automatically populate everything from the database and may be even print it directly or put a button to print.
0
 

Author Closing Comment

by:jsuanque
ID: 31577918
Thanks guys!!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question