- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All Topics
Hi,
I've got a problem i can't figure it out. I have 1 nested master page. In the nested master page i have a MultiView control with 3 Views. Two of these Views are ContentPlaceHolders and one is 'static'.Nested MasterPage is used for tabbed content. Here is the code for the nested MasterPage (Tabs.master):
<%@ Master Language="C#" MasterPageFile="~/MasterPa
<asp:Content ID="tabContent" ContentPlaceHolderID="main
<asp:Menu ID="Menu1" Width="190px" runat="server" CssClass="tabs" Orientation="Horizontal" StaticMenuItemStyle-CssCla
<Items>
<asp:MenuItem Text="Foo1" Value="0"/>
<asp:MenuItem Text="Foo2" Value="1"/>
<asp:MenuItem Text="Foo3" Value="2"/>
</Items>
</asp:Menu>
<div class="tabContents">
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="1">
<asp:View id="Tab1" runat="server">
<table width="600" height="400" cellpadding=0 cellspacing=0>
<tr valign="top">
<td style='width: 600px'>
<asp:ContentPlaceHolder ID="addNewContent" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</asp:View>
<asp:View ID="Tab2" runat="server">
<table width="600" height="400" cellpadding=0 cellspacing=0>
<tr valign="top">
<td style='width: 600px'>
<asp:ContentPlaceHolder ID="editContent" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</asp:View>
<asp:View ID="Tab3" runat="server">
<br />This is the third view
<br />This is the third view
<br />This is the third view
<br />This is the third view
</asp:View>
</asp:MultiView>
</div>
</asp:Content>
OK, let's say the ActiveViewIndex is 1 so the 2nd tab (View) will be displayed on first load. When i click on the 3rd tab, the 'static content' is showed, but when i click on 1st tab (ID="Tab1") nothing is visible....On this first tab i have a form that must be filled. The same happens if, on first run, the ActiveViewIndex is 0, so the first tab is shown....when i click on the 2nd tba, nothing is visible...the second tab contains a GridView..so, it only happens on views that happens to contain a ContentPlaceHolder.
This is the code for content page of the first tab:
<%@ Page Language="C#" MasterPageFile="~/Tabs.mas
<asp:Content ID="AddNewItemContent" ContentPlaceHolderID="addN
<table border="0" width="100%" height="100%">
<tr>
<td>
<h2>Add new data</h2>
</td>
</tr>
<tr>
<td>
<fieldset>
<legend>Fill the fields below</legend>
<table class='form'>
<colgroup>
<col />
<col />
</colgroup>
<tbody>
<tr>
<td class='label'>
<label>
<span class='required'>*</span>
Field 1:
</label>
</td>
<td class='input'>
<asp:TextBox runat="server" ID="field1" Columns="25" MaxLength="50" CssClass="i" />
<asp:RequiredFieldValidato
ErrorMessage="Mandatory" Display="None"/>
</td>
</tr>
<tr>
<td class='label'>
<label for='field2'>
<span class='required'>*</span>
Field 2:
</label>
</td>
<td class='input'>
<asp:TextBox runat="server" ID="field2" Columns="25" MaxLength="50" CssClass="i" />
<asp:RequiredFieldValidato
ControlToValidate="field2"
</td>
</tr>
<tr>
<td class='label' style='height: 24px'>
<label for='field7'>Field 8:</label>
</td>
<td class='input' style='height: 24px'>
<asp:DropDownList ID="field8" runat="server">
<asp:ListItem Selected="true" Value="Yes">Yes</asp:ListI
<asp:ListItem Value="No">No</asp:ListIte
</asp:DropDownList>
</td>
</tr>
</tbody>
</table>
</fieldset>
<asp:Button ID="btnAddNew" runat="server" BorderStyle='Ridge' Text='Adauga' Width='146px' OnClick='btnAddNew_Click'/
<asp:ValidationSummary ID="ValidationSummary1" runat="server" Font-Bold="True" Font-Italic="True"
HeaderText="Errors on adding data:" Width="100%" />
</td>
</tr>
</table>
</asp:Content>
I'll also mention that i'm using ATLAS UpdatePanel in the content page for the second tab (With the GridView), but that has nothing to do with my problem....
Did you spot the mistake ? 'cause i didnt....
Thanks in advance...
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: aki4uPosted on 2006-09-11 at 07:21:58ID: 17494736
try to remove ActiveViewIndex="1" from <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="1"> so its like this: <asp:MultiView ID="MultiView1" runat="server" >
Now, try setting ActiveViewIndex only in codebehind.