Link to home
Start Free TrialLog in
Avatar of mpoincare
mpoincare

asked on

validation works only for the first view of a multiview web page

Hi everyone,
I am having a problem with a web page. It has a multiview that shows 4 views of a patient registration form. I used validation controls to validate each step of the registration process. But validation works only in the first view. After I click the next button, the validation doesn't fire for the remaining views like the one for the "responsible party" view. I would like someone to help me pinpoint what mistake I made.
I attached two files to this question. The first is create_patient_aspx.txt that holds the html code for the webform. The second one is create_patient_aspx_cs.txt which contains the code-behind.
create-patient-aspx.txt
create-patient-aspx-cs.txt
Avatar of ororiole
ororiole
Flag of United States of America image

Make sure btnPrev and btnNext cause validation. You want the validation to occur when they change views, not only on the submit.

Anything in an UpdatePanel is async and may not cause validation. In that case, raise the validation event yourself by calling Page.Validate() or individual validator.Validate()

Avatar of mpoincare
mpoincare

ASKER

Both button (btnPrev and btnNext) have cause validation set to true. So the problem is not here. I use for view #3 both a Page.Validate() and an individual validator.Validate() - not at the same time - but the problem is not solved either. The text value of the different validators do not even show up when I am in view #3 and I click on the Next button. So the problem is still there.
I will build some test code from your code and see if I can duplicate the problem. It may take me a while cause your attachment is a little big to just copy and run. I'll get back to you as soon as I get it running.
ASKER CERTIFIED SOLUTION
Avatar of mpoincare
mpoincare

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial