Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

Including content in a View in MultiView

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nathan Sokalski - 27 Aug 2007 17:55 GMT
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


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.