我的书上木有哇~~请大家帮忙!

解决方案 »

  1.   

    呵呵 很简单的,你在MSDN上就可以找到例子.
      

  2.   

    很简单嘛。MultiView可以包含N个View.<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                <asp:View ID="View1" runat="server">
                    <h1>View 1</h1>
                </asp:View>
                <asp:View ID="View2" runat="server">
                    <h1>View 2</h1>
                </asp:View>
                <asp:View ID="View3" runat="server">
                    <h1>View 3</h1>
                </asp:View>
    </asp:MultiView>
    再加个RadioButtonList,根据RadioButtonList的选项,改变MultiView的ActiveViewIndex.<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" 
                RepeatDirection="Horizontal" 
                onselectedindexchanged="RadioButtonList1_SelectedIndexChanged">
                <asp:ListItem Value="0">View 1</asp:ListItem>
                <asp:ListItem Value="1">View 2</asp:ListItem>
                <asp:ListItem Value="2">View 3</asp:ListItem>
    </asp:RadioButtonList>
    protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
            RadioButtonList rbl = (RadioButtonList)sender;
            MultiView1.ActiveViewIndex = Convert.ToInt32(rbl.SelectedValue);
    }