日期:2014-05-17  浏览次数:20427 次

asp.net自带MultiView 控件使用问题

<form id="form1" runat="server">
    <div style="height:100%; width:100%;">
        <asp:Menu ID="Menu1"  runat="server" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False" OnMenuItemClick="Menu1_MenuItemClick"> 

        <Items>

    <asp:MenuItem ImageUrl=""  Text="页面A" Value="0"></asp:MenuItem>

    <asp:MenuItem ImageUrl="" Text="页面B" Value="1"></asp:MenuItem>
</Items>

</asp:Menu>
 
        <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0" >
            <asp:View ID="View1" runat="server">
                <iframe src="gatewayEventEdit.aspx?gatewayaddress=<%=Request.QueryString["gatewayaddress"].ToString() %>" width="100%"  height="100%"></iframe>
            </asp:View>
            <asp:View ID="View2" runat="server">
                <iframe src="xunjianresult.aspx" width="100%" height="100%"></iframe>
            </asp:View>
        </asp:MultiView>
    
    </div>
    </form>



 protected void Menu1_MenuItemClick(object sender, EventArgs e)
        {
            if (Menu1.SelectedValue.Equals("0"))
            {
                MultiView1.ActiveViewIndex = 0;
               
            }
            else
            {
                MultiView1.ActiveViewIndex = 1;
                
            }
        }



怎么进到 View1和View2对应的页面的里面,这两个页面的显示的内容都只占了页面的高度一半啊、、、

如何弄啊?

------解决方案--------------------
什么意思?各设他们的Height="50%"
------解决方案--------------------
设置一下 style='height:xxxpx'
顶一下,账号没了,没分了