What are some scenarios where MultiView would be a good choice? The MultiView control along with its View controls simply seem to extend the notion of Panels.
Both Panels and MultiViews seem prone to abuse. If your UI concerns and biz logic concerns are properly separated, why lump views together in a single ASPX?
I have used MultiViews as a more flexible basis for a Wizard control.
I do agree that lumping lots of views together is a code smell. In the case of a wizard there are often lots of pieces of state you want to share throughout the process. The multiview allows this state to be simply stored in the viewstate.
Most of the time I make the contents of each view a single user control that it can encapsulate the logic related to that particular step.
I've used it in the passed to implement a simple Ajax-enabled tab interface.
Style a button to look like a tab, then set it's onClick event to switch the active view in an update panel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With