views:

590

answers:

1

Hi,

I have a .Net project called:

Whatever.Web.UI: I use this proyect to put all the custom and user controls that will be reused in all the website projects. These are organized in two folders:

   - CustomControls folder (with all the custom controls)
   - UserControls folder (with all the user controls)

This are future examples of web proyects that should use these user and custom controls

Whatever.Web.UI.WebSite1 Whatever.Web.UI.WebSite2 .... .... .... Whatever.Web.UI.WebSiteN

To use the custom controls in each WebSite proyect is not a problem, i registered it in web.config using the following way:

<add tagPrefix="CustomControls" namespace="Whatever.Web.UI.CustomControls" assembly="Whatever.Web.UI"/>

But how could i register the user controls taking in count that they have an ascx part that i need to reference, in order to show each website?

Thanks in advance. Kind Regards. Josema.

+1  A: 
<system.web>
    <pages>
        <controls>
            <add src="~/UserControls/MyControl.ascx" tagName="MyControl" tagPrefix="MyControls"/>
        </controls>
    </pages>
</system.web>
Phaedrus