Creat new Header control

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi, I am a noob so please forgive my ignorance.

Basically I want to split up the Header into to two so I created a new control called TopHeader. I then copied the user information part, the login block. to the new control with the corresponding code from the old one. It builds ok but I get an error on the page something to do with a get on the actual ascx page not the code. Do I need to register the control somewhere to get it to work?

Thanks :)
13 years ago
hi mark

the control must be registered on the page where it will be used - eg
<%@ Register src="modules/WebUserControl.ascx" tagname="WebUserControl" tagprefix="uc1" %>



the example below is from about.aspx
<%@ Register TagPrefix="nopCommerce" TagName="Topic" Src="~/Modules/Topic.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="Server">
    <nopCommerce:Topic ID="topicAboutUs" runat="server" TopicName="AboutUs">
    </nopCommerce:Topic>
</asp:Content>



in visual studio, if you drag a user control onto a page in design view, it will create the register tag automatically

hope that helps,

- hayden
13 years ago
hi hayden,

Thanks for the comments. Actually here is a better description of my error. This is the error i am getting

<%=GetLocaleResourceString("Account.Register")%></a></li> The name GetLocaleResourceString does not exist in the current context.

Now this part of the BaseNopUserControl.cs  I added it to my TopMenu.cs file

public partial class nolTopMenuControl : BaseNopUserControl
    {

any clues?

Thanks again :)
13 years ago
Please ignore, I found my problem, was a stupid thing on my side which did not compile correctly. Once taken out it worked :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.