Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
I created three contentplaceholder in a master page.
Whatever is in the header contentplaceholder it supposed to be displayed at top of the sub pages but it does not.
Please could you tell me what I am doing wrong.
Thanks in adv.
Can you paste your markup here?
Hi Anthony,
here is markup. I tried to follow CWS site by Warren Buckley
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"> <!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> <title><umbraco:Item Field="siteName" runat="server" /></title> <!-- CSS --> <link href="/CSS/Reset.css" rel="stylesheet" type="text/css" /> <link href="/CSS/Styles.css" rel="stylesheet" type="text/css" />
<!-- JS --> <script src="../scripts/jquery-1.7.1.min.js" type="text/javascript"></script> <!-- Meta Data --> <meta name="description" content="<umbraco:Item field='metaDescription' recursive='true' runat='server' />" /> <meta name="keywords" content="<umbraco:Item field='metaKeywords' runat='server' />" /> </head> <body> <div id="container"> <!-- HEADER --> <div id="header"> <div class="container clearfix"> <h1 class="flashHeader left"> <a href="/" title="« Back to Your Company Name"> <umbraco:Item field="siteName" runat="server" /> </a> </h1> <div class="right headerLinks"> <asp:contentplaceholder id="headerLinksContent" runat="server"> <form id="Form1" runat="server"> <asp:loginview id="LoginView1" runat="server"> <AnonymousTemplate> Please Login: </AnonymousTemplate> <LoggedInTemplate> Welcome:<asp:LoginName id="LoginName1" runat="server"></asp:LoginName> </LoggedInTemplate> </asp:loginview> <asp:loginstatus id="LoginStatus1" runat="server"></asp:loginstatus> </form> </asp:contentplaceholder> <!-- Search box --> <div class="right searchBox"> <input type="text" /> <button>Search</button> </div> </div> </div> </div>
<!-- BODY--> <div id="body"> <div class="clearfix"> <div id="sideBar" class="left"> <umbraco:Macro Alias="HSNavigation" runat="server" /> <asp:contentplaceholder id="sideBarContent" runat="server"> </asp:contentplaceholder> </div> <asp:contentplaceholder id="childContent" runat="server"> </asp:contentplaceholder> </div> </div> <!-- FOOTER --> <div id="footer"> </div> </div> <%--Container--%> </body> </html></asp:Content>
Replace this chunk
<asp:contentplaceholder id="headerLinksContent" runat="server"> <form id="Form1" runat="server"> <asp:loginview id="LoginView1" runat="server"> <AnonymousTemplate> Please Login: </AnonymousTemplate> <LoggedInTemplate> Welcome:<asp:LoginName id="LoginName1" runat="server"></asp:LoginName> </LoggedInTemplate> </asp:loginview> <asp:loginstatus id="LoginStatus1" runat="server"></asp:loginstatus> </form> </asp:contentplaceholder>
with
<asp:contentplaceholder id="headerLinksContent" runat="server" /> <form id="Form1" runat="server"> <asp:loginview id="LoginView1" runat="server"> <AnonymousTemplate> Please Login: </AnonymousTemplate> <LoggedInTemplate> Welcome:<asp:LoginName id="LoginName1" runat="server"></asp:LoginName> </LoggedInTemplate> </asp:loginview> <asp:loginstatus id="LoginStatus1" runat="server"></asp:loginstatus> </form>
The reason I put login control in contentplace holder it was throwing an error as below.
Control 'ctl00_ctl00_ctl00_ContentPlaceHolderDefault_LoginStatus1' of type 'LoginStatus' must be placed inside a form tag with runat=server
Please could you suggest any other alternative to put the login control in header of master page.
regards
Oops. I didnt notice the form.
Put the form on the outside.
<form id="Form1" runat="server">
<asp:contentplaceholder id="headerLinksContent" runat="server" /> <asp:loginview id="LoginView1" runat="server"> <AnonymousTemplate> Please Login: </AnonymousTemplate> <LoggedInTemplate> Welcome:<asp:LoginName id="LoginName1" runat="server"></asp:LoginName> </LoggedInTemplate> </asp:loginview> <asp:loginstatus id="LoginStatus1" runat="server"></asp:loginstatus> </form>
Actually form tag does not work itself unless I put this into a content place holder.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Master page!
Hi All,
I created three contentplaceholder in a master page.
Whatever is in the header contentplaceholder it supposed to be displayed at top of the sub pages but it does not.
Please could you tell me what I am doing wrong.
Thanks in adv.
Can you paste your markup here?
Hi Anthony,
here is markup. I tried to follow CWS site by Warren Buckley
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<!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>
<title><umbraco:Item Field="siteName" runat="server" /></title>
<!-- CSS -->
<link href="/CSS/Reset.css" rel="stylesheet" type="text/css" />
<link href="/CSS/Styles.css" rel="stylesheet" type="text/css" />
<!-- JS -->
<script src="../scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<!-- Meta Data -->
<meta name="description" content="<umbraco:Item field='metaDescription' recursive='true' runat='server' />" />
<meta name="keywords" content="<umbraco:Item field='metaKeywords' runat='server' />" />
</head>
<body>
<div id="container">
<!-- HEADER -->
<div id="header">
<div class="container clearfix">
<h1 class="flashHeader left">
<a href="/" title="« Back to Your Company Name">
<umbraco:Item field="siteName" runat="server" />
</a>
</h1>
<div class="right headerLinks">
<asp:contentplaceholder id="headerLinksContent" runat="server">
<form id="Form1" runat="server">
<asp:loginview id="LoginView1" runat="server">
<AnonymousTemplate>
Please Login:
</AnonymousTemplate>
<LoggedInTemplate>
Welcome:<asp:LoginName id="LoginName1" runat="server"></asp:LoginName>
</LoggedInTemplate>
</asp:loginview>
<asp:loginstatus id="LoginStatus1" runat="server"></asp:loginstatus>
</form>
</asp:contentplaceholder>
<!-- Search box -->
<div class="right searchBox">
<input type="text" />
<button>Search</button>
</div>
</div>
</div>
</div>
<!-- BODY-->
<div id="body">
<div class="clearfix">
<div id="sideBar" class="left">
<umbraco:Macro Alias="HSNavigation" runat="server" />
<asp:contentplaceholder id="sideBarContent" runat="server">
</asp:contentplaceholder>
</div>
<asp:contentplaceholder id="childContent" runat="server">
</asp:contentplaceholder>
</div>
</div>
<!-- FOOTER -->
<div id="footer">
</div>
</div>
<%--Container--%>
</body>
</html>
</asp:Content>
Replace this chunk
with
Hi Anthony,
The reason I put login control in contentplace holder it was throwing an error as below.
Control 'ctl00_ctl00_ctl00_ContentPlaceHolderDefault_LoginStatus1' of type 'LoginStatus' must be placed inside a form tag with runat=server
Please could you suggest any other alternative to put the login control in header of master page.
regards
Oops. I didnt notice the form.
Put the form on the outside.
<form id="Form1" runat="server">
Actually form tag does not work itself unless I put this into a content place holder.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.