Hi,
As your description, your mean is the dropdownlist control is in the master page and the MultiView is in the content page?
For exampe:
1. Master apge:
<td style="width: 100px">
<asp:DropDownList ID="ddTest" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddTest_SelectedIndexChanged" >
<asp:ListItem Value="0" Selected="True">-</asp:ListItem>
<asp:ListItem Value="1">TEST 1</asp:ListItem>
<asp:ListItem Value="2">TEST 2</asp:ListItem>
</asp:DropDownList>
</td>
<td colspan="2" rowspan="2">
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</td>
2. Content page:
<%@ Page Language="C#" MasterPageFile="~/TestMutileView/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="TestMutileView_Default" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="view1" runat="server">
<p>TEST 1</p>
</asp:view>
<asp:View ID="view2" runat="server">
<p>TEST 2</p>
</asp:View>
</asp:MultiView>
</asp:Content>
3.So you can get the do in the Master page codebehind:
protected void ddTest_SelectedIndexChanged(object sender, EventArgs e)
{
MultiView mv = (MultiView)this.ContentPlaceHolder1.FindControl("MultiView1");
if (ddTest.SelectedIndex != 0)
{
mv.ActiveViewIndex = Convert.ToInt16(ddTest.SelectedIndex) - 1;
}
}
If I misunderstand you, please let me know.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Yours sincerely,
Amanda Wang
Microsoft Online Community Support