ASP .NET - Validators in a MultiView
A few weeks ago I needed to create a step-by-step wizard that required more functionality than the built-in Wizard control provided out of the box. I created my custom wizard by taking advantage of the MultiView control which is essentially what the Wizard control is based on. After creating my custom wizard I tackled a requirement that specified all validation had to occur on the final step of the wizard when the user clicked "Finish". I designed the wizard so each view would have validators with a ValidationGroup unique to that view. My original plan was to call the following code:

Unfortunately, this code will not return the correct result. Why? Well after some investigating it turns out validation controls in a hidden View will not be validated and checking IsValid on those controls will always return true. It would be interesting to find out why this design decision was made.
The following code will get around this:

One caveat to this method is that the MultiView's ActiveViewChanged event will fire so you'll need to take that into account if you are using it.