web user control in a master page?

  • Thread starter Thread starter Stimp
  • Start date Start date
S

Stimp

I have a few master page files on a large site.

I want them all the share the same footer, but I don't want to re-enter
the footer text on all of them.

So I logically thought I could add a web user control to the master page
which would contain the footer text.

so I add:

<%@ Register TagPrefix="gn" TagName="gnfooter" Src="/gnfooter.ascx"
%>

<gn:gnfooter id="ctlFooter" runat="server" />


but I keep getting an error saying "gnfooter is not a known element".

Are user controls not allowed in master pages?

What would the alternative be to this problem?

Thanks.
 
Hello Stim
I have a few master page files on a large site.

I want them all the share the same footer, but I don't want to re-enter
the footer text on all of them.

So I logically thought I could add a web user control to the master page
which would contain the footer text.
Keyword: Nested masterpages
UserControls are surely allowed on masterpages,
check your src-attribute.
 
Hello Stim

Keyword: Nested masterpages
UserControls are surely allowed on masterpages,
check your src-attribute.

ah yes... "~/gnfooter.ascx" was the solution!

cheers!
 
Back
Top