When I include a MultiView control in my application, I receive the
following error:
MultiView cannot have children of type 'Label'. It can only have children
of type View.
I receive the same error (with 'Label' replaced with another control type)
when I use other control types as well. The only type of control that is an
immediate child of my MultiView control is View. The basic layout of my
MultiView control is:
<asp:MultiView ID="mvwDetails" runat="server" ActiveViewIndex="0">
<asp:View>
'the controls that I want displayed for this View
</asp:View>
<asp:View>
'the controls that I want displayed for this View
</asp:View>
<asp:View>
'the controls that I want displayed for this View
</asp:View>
<asp:View>
'the controls that I want displayed for this View
</asp:View>
</asp:MultiView>
If I cannot place anything inside the View tags, how am I supposed to use
MultiView? Is there something I am missing or forgetting? If somebody could
please help me, I would appreciate it. Thanks.
Mark Rae [MVP] - 27 Aug 2007 18:57 GMT
> Is there something I am missing or forgetting?
Yep, specifically to add runat="server" to the <asp:View> tags:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.multiview.aspx

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net