I wish to allow the user an option to navigate away from a Register page. However the register page is an ASP:Wizard with RequiredFieldValidators.
How can I fix this without removing the RequiredFieldValidators? The “Next” button of the wizard seems to be built-in to the Wizard control and doesn’t seem to let me apply a ValidationGroup property, which seems to be the typical way to handle this situation.
Thanks
From http://forums.asp.net/p/1022184/1385194.aspx
After searching over and over on how to validate my wizard control steps, i came up with these solutions. Remember that each step should have it’s own validation group. For these sample i use “Form” as my validation group.
1) Validation on the next button click.
For this one, i simply override the Previous and Next button autogenerated by the Wizard Control by using 2 asp:Button. You then set the cause validation to true and you assign a validation group. Note that the important part is in the CommandName section.
2) Validation on Sidebar click
This one is also simple. You add the code in the SideBarButtonClick event of your control and then you check the step id you are currently. After it validates the page with the validation group in parameters. If the page is not valid. It cancel the event.