ASP. NET MultiView field switching View

Source: Internet
Author: User
Through the MultiView control, we can easily organize multiple items into several views. To facilitate switching in the view, the control discloses four command read-only fields. You can use the CommandName and CommandArgument attributes of the Button to conveniently call
NextViewCommandName-locate to the next view
Previusviewcommandname-locate to the previous view
SwitchViewByIDCommandName-locate the view ID
SwitchViewByIndexCommandName-locate the corresponding index
For example:

<Asp: multiview ActiveViewIndex = "0" runat = "server">
<Asp: View ID = "firstView" runat = "server">
<Span> page 1 </span>
<Asp: Button ID = "btnNext" runat = "server" Text = "next page" CommandName = "NextView"/>
</Asp: View>
<Asp: View ID = "secondView" runat = "server">
<Span> page 2 </span>
<Asp: Button ID = "btnPrev" runat = "server" Text = "Previous Page" CommandName = "PrevView"/> <asp: button ID = "btnNext2" runat = "server" Text = "next page" CommandName = "NextView"/>
</Asp: View>
<Asp: View ID = "thirdView" runat = "server">
<Span> page 3 </span>
<Asp: Button ID = "btnFirst" runat = "server" Text = "first page" CommandName = "SwitchViewByID" CommandArgument = "View1"/>
<Asp: Button ID = "btnSecond" runat = "server" Text = "Page 2" CommandName = "SwitchViewByIndex" CommandArgument = "1"/>
</Asp: View>
</Asp: multiview>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.