How to use asp.net user control in another user control?

I have a user control ( gallery.ascx), and I want to use the control photo.ascxin a gallery control. I added this register at the top gallery.ascx, but it still cannot find the photo:

<%@ Register TagPrefix="ssctrl" TagName="photo" Src="controls/photo.ascx" %>

Any ideas?

+5
source share
1 answer

In case someone wonders if the Register is correct, my user image management tag is simply not formed properly. I had it like:

<ssctrl:photo ID="Photo" Key="<%# Eval("PageTemplatePK") %>" runat="server" />

Key , Eval:

<ssctrl:photo ID="Photo" Key='<%# Eval("PageTemplatePK") %>' runat="server" />

.

+5

All Articles