I currently have an ASP.Net Web Form
that looks like this:
Each section of this web form is wrapped in its own div
so that they could be shown or hidden by changing the CSS display:
property to none
. My intention is to show each section one at a time, starting with the first one. When the user clicks "Next" the currently visible section will be hidden and the next section will be displayed in its place.
Many of the fields have ASP.Net validation controls attached to them (the "Zip Code" validation error message is displayed in this image as an example).
These validation controls have the runat=server
The whole Web Form
is being loaded into a parent div dynamically through AJAX
. Each Next
button is not of type submit
(they are of <input type= "button">
).
How can I ensure that all fields in a given section are validated before allowing the user to hit "Next" ?
I am pretty stuck on this so some assistance would be really appreciated!