Vikas Ahlawat

Vikas Ahlawat

  • NA
  • 564
  • 817.5k

Nested Master page problem?

Nov 2 2010 2:15 AM
I m using nested master pages, my problem is that when i m taking simple form under these nested master pages then contentplace holder not appear attomatically
So where i can add controls

my code
Parent maste page code
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Simple.master.cs" Inherits="NestedMasterPages_Simple" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
       
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>


Sub master page content

<%@ Master Language="C#" MasterPageFile="~/NestedMasterPages/Simple.master" AutoEventWireup="false" CodeFile="SubMasterPage.master.cs" Inherits="NestedMasterPages_SubMasterPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>


Content page
<%@ Page Language="C#" MasterPageFile="~/NestedMasterPages/SubMasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="NestedMasterPages_Default" Title="Untitled Page" %>

<%-- Add content controls here --%>

Now where in this page i can add controls there is no content place holder.


Answers (1)