Use of multiview and view

Source: Internet
Author: User

View is a view control, while multiview is a multi-view control. Both of them belong to a container control and are usually used together. The multiview control is similar to the tabcontrol Control in winform. You can place multiple views (I .e. tabs) on a single page. In this case, you can consider multiview as the view container. You can use multiview to switch to different tabs on the same page to view different content without opening another page.
View indicates the page to jump.

 

<% @ Page Language = "C #" autoeventwireup = "true" codebehind = "multiviewdemo1.aspx. cs" inherits = "web925 application. multiviewdemo1" %>

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head runat = "server">
<Title> </title>
</Head>
<Body>
<Form ID = "form1" runat = "server">
<Div>
<Asp: multiview id = "multiview1" runat = "server" activeviewindex = "0">
<Asp: View id = "view1" runat = "server">
<Asp: button id = "button5" runat = "server" text = "to a page" commandname = "switchviewbyid" commandargument = "view3"/>
<Asp: button id = "button1" runat = "server" text = "next page" commandname = "nextview"/> <br/>
<Asp: Calendar id = "calendar1" runat = "server"> </ASP: Calendar>
</ASP: View>
<Asp: View id = "view2" runat = "server">
<Asp: button id = "button3" runat = "server" text = "Previous Page" commandname = "prevview"/> <br/>
<Asp: button id = "button2" runat = "server" text = "next page" commandname = "nextview"/> <br/>

<Asp: dropdownlist id = "dropdownlist1" runat = "server">

<Asp: listitem value = "1"> Shandong </ASP: listitem>
<Asp: listitem value = "2"> Hunan </ASP: listitem>
<Asp: listitem value = "3"> Hebei </ASP: listitem>

</ASP: dropdownlist>
</ASP: View>
<Asp: View id = "view3" runat = "server">
<Asp: button id = "button4" runat = "server" text = "Previous Page" commandname = "prevview"/> <br/>
<Asp: fileupload id = "fileupload1" runat = "server"/>
</ASP: View>
</ASP: multiview>



</Div>
</Form>
</Body>
</Html>

 

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.