Hi,
this error says you have to place all content in your content page has to be
placed to asp:Content control(s). Number of these asp:Content controls cannot
be greater than placeholders in master page.
So in example:
Master page
<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!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>
</head>
<body>
<form id="myForm" runat="server">
<div>
<asp:contentplaceholder id="FirstPlacelholder" runat="server">
</asp:contentplaceholder>
</div>
</form>
</body>
</html>
Content page
<%@ Page Language="C#" AutoEventWireup="true"
MasterPageFile="~/MasterPage.master" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<asp:Content runat="server" ID="myContent"
ContentPlaceHolderID="FirstPlacelholder">
<!-- put all content here, if any content is placed outside of this
element you will get your error -->
</asp:Content>
Regards,
Ladislav
[quoted text, click to view] "mr t" wrote:
> For those of you whose first language is English, could you please
> explain to me what this means?
>
> "Content controls have to be top-level controls in a content page or a
> nested master page that references a master page"
>
> that's the error I got from visual studio 2005 when trying to run a
> page which has a master page. Is it my english or people in Redmond,
> WA are faring poorly on English 101.
>
> thanks in advance.
>