views:

74

answers:

1

I have a web application, which works fine if I include my user controls with

<%@ Register TagPrefix="mine" TagName="MyUC1" Src="~/UserControls/MyUc1.ascx" %>
<%@ Register TagPrefix="mine" TagName="MyUC2" Src="~/UserControls/MyUc2.ascx" %>

But I need to use the namespace due to needing to integrate with Umbraco. When I replace the register declaration with:

<%@ Register TagPrefix="mine" Namespace="MyAssembly.UserControls" Assembly="MyAssembly"%>

I get a null reference exception in the UserControl's Page_Load event (which references an ASP.NET control which is used by the UserControl itself.

I find this pretty bizarre, but I've found very little information on how to fix it.

A: 

Did you try to put references inside Web.config file?

Like this:

<compilation debug="true">
  <assemblies>
    [...]
    <add assembly="DevExpress.Web.ASPxEditors.v8.3" />
  </assemblies>
</compilation>

UPDATE:

Then maybe you can also register your controls in Web.config, like this:

<pages theme="Default">
  <controls>
    [...]
    <add assembly="DevExpress.Web.ASPxEditors.v8.3" namespace="DevExpress.Web.ASPxGridView" tagPrefix="dxe" />
  </controls>
</pages>
WooYek
Yes, they've all been added.
Echilon
Yes, I don't think the problem is with the usercontrol not being found, it's that I get NullReferenceExceptions for the controls on the usercontrol in the Page_Load event.
Echilon