mathieu_cupryk
asked on
3 column dynamic master page. with nest master page.
I have a problem I have a nested master page and I am not sure why I cannot put an ascx
web control in the below code.
I have to put it outside the
<asp:ContentPlaceHolder ID="ContentPlaceholder_Rig htMenu" runat="server">
</asp:ContentPlaceHolder>
in order to see it. please check omegalove.com
I would like to understand why this is not working?
<%@ Master Language="C#" MasterPageFile="~/ParentRo ot.master" AutoEventWireup="true" CodeFile="MasterPage.maste r.cs" Inherits="MasterPage" %>
<%@ Register src="Controls/LeftMenu.asc x" tagname="LeftMenu" tagprefix="uc2" %>
<%@ Register src="Controls/Search/Searc hBox.ascx" tagname="SearchBox" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Cont entPlaceho lder1" Runat="Server">
<table border="0" cellspacing="0" cellpadding="0" id="content-container">
<tr>
<td id="content-left">
<uc2:LeftMenu ID="LeftMenu1" runat="server" />
<asp:ContentPlaceHolder ID="ContentPlaceholder_Lef tMenu" runat="server">
left side
</asp:ContentPlaceHolder>
</td>
<td id="content">
<asp:ContentPlaceHolder ID="ContentPlaceholder_Cen ter" runat="server">
</asp:ContentPlaceHolder>
</td>
<td id="content-right">
<uc1:SearchBox ID="SearchBox1" runat="server" />
<asp:ContentPlaceHolder ID="ContentPlaceholder_Rig htMenu" runat="server">
why can I not place it here.
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</asp:Content>
web control in the below code.
I have to put it outside the
<asp:ContentPlaceHolder ID="ContentPlaceholder_Rig
</asp:ContentPlaceHolder>
in order to see it. please check omegalove.com
I would like to understand why this is not working?
<%@ Master Language="C#" MasterPageFile="~/ParentRo
<%@ Register src="Controls/LeftMenu.asc
<%@ Register src="Controls/Search/Searc
<asp:Content ID="Content1" ContentPlaceHolderID="Cont
<table border="0" cellspacing="0" cellpadding="0" id="content-container">
<tr>
<td id="content-left">
<uc2:LeftMenu ID="LeftMenu1" runat="server" />
<asp:ContentPlaceHolder ID="ContentPlaceholder_Lef
left side
</asp:ContentPlaceHolder>
</td>
<td id="content">
<asp:ContentPlaceHolder ID="ContentPlaceholder_Cen
</asp:ContentPlaceHolder>
</td>
<td id="content-right">
<uc1:SearchBox ID="SearchBox1" runat="server" />
<asp:ContentPlaceHolder ID="ContentPlaceholder_Rig
why can I not place it here.
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</asp:Content>
i need to understand why?
<td id="content-right">
<uc1:SearchBox ID="SearchBox1" runat="server" />
<asp:ContentPlaceHolder ID="ContentPlaceholder_RightMenu" runat="server">
</asp:ContentPlaceHolder>
</td>
The placeholder is for the pages using the Masterpage. I think even if you place any controls inside it, it will get replaced.
<asp:ContentPlaceHolder ID="ContentPlaceholder_Rig htMenu" runat="server">
why can I not place it here.
</asp:ContentPlaceHolder>
Anything in between the contentplaceholder tags will get replaced on your content pages, unless you delete the content pane that points at it, in which case it will default to the master page content. If that's the case though, why not just delete the content placeholder and put the user control there?
This is what you would delete on your content pages:
<asp:Content ID="Content3" ContentPlaceHolderID="Cont entPlaceHo lder_Right Menu" Runat="Server">
</asp:Content>
why can I not place it here.
</asp:ContentPlaceHolder>
Anything in between the contentplaceholder tags will get replaced on your content pages, unless you delete the content pane that points at it, in which case it will default to the master page content. If that's the case though, why not just delete the content placeholder and put the user control there?
This is what you would delete on your content pages:
<asp:Content ID="Content3" ContentPlaceHolderID="Cont
</asp:Content>
ASKER
i have to put the ascx in every page.
any other way of doing this?
any other way of doing this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
duh, ok kool.