Click here to Skip to main content
15,902,939 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm currently in the process of transforming a classis ASP web application to

THe application is relatively simple, it is a 3-page web application.

Page 1: enter info into textboxes (time, date, name, name, name, yadda yadda yadda), some radio buttons, some checkbox choices, etc.

Page 2: Given the choices made on page one (if Checkbox 1 was clicked, then display categories pertaining to checkbox 1, etc.) and the info input in page one, all of this is displayed here, on page 2, along with new radio buttons and checkboxes, more textboxes, etc. perhaps 100 total or so.

Page 3: Everything is summarized and then entered into a DB

My question is the following:

I have been working on transforming everything from the old asp application to .net

Anyway, I got the session variables for the checkboxes, radio buttons (using checkboxlists and radiobuttonlists as these can be easily saved into an arraylist in a session variable), textboxes info, etc, etc, etc.

Suddenly, my peer tells me it is best to dump all the info into ONE PAGE with multiple forms, two of each forms hidden at a time... only one form displayed at once... behavnig like an individual page (each form simulating a page)... that way, we would not deal with session variables!

I had not thought of that, but something tells me that is not the correct approach... besides, dumping everything into one page would be A LOT OF CODE!!!!

Who is correct or what would be the right approach for this?

Thank you!
Kornfeld Eliyahu Peter 13-Aug-14 15:18pm    
Angular is a perfect framework to build small single-page web application - your case sounds me like a perfect candidate...
TheAbominable 13-Aug-14 15:35pm    
Yes, but I'm strictly sticking to ASP.NET
Thank you.

I forgot to add/mention that we MUST stick to .NET at my job, so we cannot use another platform/language.
Kornfeld Eliyahu Peter 13-Aug-14 15:52pm    
In that case just do 3 pages as before...
TheAbominable 13-Aug-14 16:01pm    
WHY??? LOL That is the original question! What is the advantage and/or disadvantage or using multiple forms in one page as opposed to different pages?
Kornfeld Eliyahu Peter 13-Aug-14 16:07pm    
Oh! ASP.NET has a big problem to handle multiple form elements in one page (it not goes in line with HTML). Also it will give you a clear separation of the steps...
If you use a technique (any technique) to show/hide content on the same page you will get a code that hard to maintain and understand.
If you have problem to use session variables store your data in temporary table in your DB or in cookies. Both solution will give you the advantage to stop/continue the process ath any time and any step...

1 solution

I LOVE the Multiview control for this. No complex code to show and hide, use button events to set the active view. State is held on the page in View State. Technically just one form, but only the active view is sent to the browser so it functions much like multiple pages. Theres' no management of session variables per se, all objects are available server side. The only down sides are control IDs for any client Javascript and using FindControl to locate the controls.
Share this answer
Kornfeld Eliyahu Peter 13-Aug-14 17:21pm    
And all the server/client side functionality is on the same page, so you easily can get into a state where you mess with a too complex code for nothing...
PhilLenoir 13-Aug-14 17:27pm    
I can't say I've ever had that problem and the last one I did was a pretty complex eCommerce application that involved passing data to and from a card processor via an iFrame. The application that the poster mentioned was a simple application. My programming mantra is KISS: Keep It Simple Software developer!
Kornfeld Eliyahu Peter 13-Aug-14 17:44pm    
A complex eCommerce application in one ASP.NET page? It sounds awful to me...I would consider a ASP.NET page with more then a few (and I mean 2-3) hundred lines of code in as a bad design...Even ASP.NET forms are not support/force separation of code it should be kept in sight anyway - by the developer...

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900