473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Re submitting to the same form

Hi,

I'm building a web form utilizing ASP.NET and VB.NET. The web form has three
pages:
1. The first page has a set of text boxes that a user has to fill out and
then hit the next button. Once this is done the form has to resubmits to
itself and if all the required data is entered it displays the next page.
2. The second page is another input screen. When the user has completed
filling out the required fields on the page the user hits a submit button and
the form resubmits to it self and stores a set of data to a database. The
form then moves on to display the next page.
3. The third page displays some output text to the screen including thankyou
details.

Please note I want the form to resubmit to the same page.

I have a good background in ASP (have built similar online applications
before in ASP) also have read 'Essential ASP.NET' by Fritz Onion (loved it -
has helped me so much) also have just grabbed 'ASP.NET unleashed' by Stephen
Walther.

Here is the question.
How do I move through these screens with ASP.NET. Or another way to ask the
questions how do I display the different page formats after the user has hit
the next and submit buttons (and possibly previous with the second page). I’m
very confused with the framework requirements. Could someone please help?

Thank you in advance,
George.

Nov 19 '05 #1
2 1498
The simple and prescribed way of doin this is to actually only use one
aspx page.

Have three panels on this page, by default have panel 1 set to visible
and 2 and 3 set to not visible,

Panel 1 contains the first input controls, panel 2 contains the second
etc. etc.

Then when you do a post back (when the first panel is visible) simply
make the first panel not visible and the second visible,

On the second post back (check if the second panel is visible to test
if it is the second postback), save the state to the DB, the state from
the first input will still be in the control collection.

Finaly display the third panel (making 1 and 2 not visible)

Nov 19 '05 #2
Hi George,

Postback is the standard behavoiur of asp.net pages for the majority of web
control events (if not all) such as a button submit on a web form. During the
postback you can perform the necessarry form validation or have validation
controls do this for you and then transfer the user to trhe next page if
validation passes. You can use the Response.Redirect(), Server.Transfer() or
Server.Execute() methods to do this which are similar to those is ASP. Each
has their own pros and cons so it's worth checking the MSDN. Generally
Response.Redirect() is probably the easiest but will involve and additional
round trip between the client and server and form post details will be lost
during the redirect.

Hope this helps, Andy

"geodev" wrote:
Hi,

I'm building a web form utilizing ASP.NET and VB.NET. The web form has three
pages:
1. The first page has a set of text boxes that a user has to fill out and
then hit the next button. Once this is done the form has to resubmits to
itself and if all the required data is entered it displays the next page.
2. The second page is another input screen. When the user has completed
filling out the required fields on the page the user hits a submit button and
the form resubmits to it self and stores a set of data to a database. The
form then moves on to display the next page.
3. The third page displays some output text to the screen including thankyou
details.

Please note I want the form to resubmit to the same page.

I have a good background in ASP (have built similar online applications
before in ASP) also have read 'Essential ASP.NET' by Fritz Onion (loved it -
has helped me so much) also have just grabbed 'ASP.NET unleashed' by Stephen
Walther.

Here is the question.
How do I move through these screens with ASP.NET. Or another way to ask the
questions how do I display the different page formats after the user has hit
the next and submit buttons (and possibly previous with the second page). I’m
very confused with the framework requirements. Could someone please help?

Thank you in advance,
George.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your...
2
by: Greg T | last post by:
Hi, I have a rather long form that I don't want people submitting unless they are absolutely sure they are ready. I figured the easiest way to prevent an accidental form submission by way of...
5
by: Don | last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is there some way, using JavaScript, to setup a <form> tag to do this? Thanks, Don ----==...
1
by: Richard Dixson | last post by:
I have code that calls document.myFormName.submit() to submit a form automatically via JavaScript. This works just fine. However, if there is a button (or other form field element) on the form...
1
by: Hello | last post by:
Scenario: A page creates a pop up and that pop up submits a form. Is there a way to detect whether the submitting was successful or not, so true/false could be passed to the parent window?
4
by: Super Steve | last post by:
I'm trying to write a little script that disables the submit button on a form, changes the text of the button, and then submits the form. Can anyone tell me why this works ok: <input...
3
by: kgbalaji1980 | last post by:
Hi all, i want the jscript coding for more than one form in one page and submitting the same . ie one parent form and one append button when we click that button one child form will display...
18
by: NavinM | last post by:
I have a couple of forms that are misbehaving in FireFox, but work fine in IE. when i do submit( with submit button) a javascript function validates all of the fields entered, and stops the...
1
by: dittu | last post by:
How to close the popup window when submitting the form? I have a sample.jsp. In that page one button is there. when button pressed, open popup window contains one "text box" and one " submit...
6
by: phpnewbie26 | last post by:
This has been confusing me for a while. I don't understand why it isn't working. In my original coding, I have an action called submitted.php and this is what is looks like: <?php ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.