When I put a webtab on a master page, I get the page duplicated when viewing the contents of a tab. I've checked this in IE6, IE7 and FireFox2, all with the same results. Here are the steps you can take to duplicate the issue.
Copy the following code into the Default.aspx page:<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server"> This is on the default.aspx page.</asp:Content>
Create two new web forms; Tab1.aspx and Tab2.aspx.
Copy the following code into Tab1.asp:<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="Tab1Content" Runat="Server"> <br /> This is on the first tab. <br /></asp:Content>
Copy the following code into Tab2.aspx:<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %><asp:Content ID="Content2" ContentPlaceHolderID="Tab2Content" Runat="Server"> <br /> This is on the second tab. <br /></asp:Content>
When I view default.aspx in my browser, I see the text in the master page, the tab control, then the text in default.aspx page. Tab 1 of the WebTab displays the default.aspx page again(including another tab control), but without the text contained in the default.aspx page. Tab 2 only displays a blank, blue screen.
Can someone tell me where I've gone wrong here?
From what I see here, you may be using master pages incorrectly. When using master pages, the master page serves as a template. So when your default.aspx loads, it will compile the master page then your aspx page and make one page from the combination. The content placeholders serve as locations that you can plug content into. Your content page, default.aspx, will be responsible for creating content in all three placeholders and not just one.
From your layout it seems you would rather use user controls for your Tab1.aspx and Tab2.aspx, so Tab1.ascx and Tab2.ascx. You can place contentplaceholders inside of the tabs but you will have some issues at design time since you will only be able to access the top tab.
Instead you can probably use each tab's ContentPane.UserControlUrl property that you can use to load the user controls. With that in mind, I am if you really need master pages.