Why I can't add a user control to the "layout.master"?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
6/19/2010 3:45:50 AM
Gravatar
Total Posts 2

Why I can't add a user control to the "layout.master"?

Problem: I create a user control in the folder "Controls" of the mojoPortal.Web-vs2008 and add it the "layout.master" as follows, but it doesn't work.

<div id="wrapheader">
<portal:SiteTitle id="SiteTitle" runat="server"></portal:SiteTitle>
<portal:SkipLink id="SkipLink1" runat="server" />
<portal:SiteMenu id="SiteMenu1" runat="server"
UseTreeView="false" UseSpanInLinks="true" HideMenuOnSiteMap="false"
Direction="Horizontal" TopLevelOnly="true"></portal:SiteMenu>

<div class="topnav">
<ul>
<portal:WelcomeMessage id="WelcomeMessage" runat="server" RenderAsListItem="true" ListItemCSS="firstnav" />
<portal:HomeLink id="HomeLink" runat="server" RenderAsListItem="true" />
<portal:SiteMapLink id="SiteMapLink2" runat="server" CssClass="sitelink" RenderAsListItem="true" />
<portal:MyPageLink id="MyPageLink1" runat="server" RenderAsListItem="true" />
<portal:UserProfileLink id="UserProfileLink" runat="server" RenderAsListItem="true" />
<portal:MailboxLink id="MailboxLink1" runat="server" RenderAsListItem="true" />
<portal:MemberListLink id="MemberListLink" runat="server" RenderAsListItem="true" />
<portal:RegisterLink id="RegisterLink" runat="server" RenderAsListItem="true" />
<portal:SearchInput id="SearchInput1" LinkOnly="True" RenderAsListItem="true" runat="server" />
<portal:LoginLink id="LoginLink" runat="server" RenderAsListItem="true" />
<portal:LogoutLink id="LogoutLink" runat="server" RenderAsListItem="true" />
</ul>
</div>
<%-- Add a the top navigation and logo --%>
<div class="topMenuLogoSkin">
     <portal:TopMenuLogo id="TopMenuLogo1" runat="server" />
</div>

</div>

 

6/19/2010 5:35:13 AM
Gravatar
Total Posts 72

Re: Why I can't add a user control to the "layout.master"?

Have you recompiled after creating your user control?

Do you get any kind of error when loading your page?

6/20/2010 10:01:15 PM
Gravatar
Total Posts 125

Re: Why I can't add a user control to the "layout.master"?

Your user control should have your own namespace and register it before you use.

You must sign in to post in the forums. This thread is closed to new posts.