views:

14

answers:

1

I have own control implemented in "CommonControls" assembly (the same namespace). It us 'Custom control' inherited from 'WebControl' class and implemented without ascx file.

It is necessary to use this control in "main" web site. Could you please advise how to register this control?

I know it should be something like this:

<%@ Register Assembly="CommonControls" Namespace="CommonControls" 
    TagPrefix="uc" TagName="TopMenuControl" Src="..." %>

But what should I specify in the "Src" property?

Thanks.

A: 

It seems like I've found solution myself:

<%@ Register Assembly="CommonControls" Namespace="CommonControls" TagPrefix="uc" %>
<uc:TopMenuControl class="container" runat="server" />

Src and TagName are just not required :)

But anyway, any thoughts (if you see any better solution) are welcome .

Budda
That is the correct solution. TagName and Src are for User Controls. When you are using Custom Controls, you specify the assembly and namespace.
RPM1984