web user control in a master page?

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.
 
P

Peter Bucher [MVP]

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.
 
S

Stimp

Hello Stim

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

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

cheers!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top