I created a user control in a project that I want to reuse in a separate project. I saw similar attempts, successfully completed by adding a link to the source project, and then registering the control with:
<%@ Register Assembly="AssemblyName" Namespace="AssemblyName.Namespace" TagPrefix="xxx" %>
I did something similar by compiling the original project and referencing it in the following. The control has an asp: Repeater control. Then I registered my control as described above and placed the control on my page like this (the control has a string property called prop):
<xxx:ControlName ID="ControlId" runat="server" prop="21" />
However, when I run the control in a subsequent project, I get an exception with a null reference and the application suffocates. Am I doing it wrong? Do I have to have a .ascx file in the next project?
Any help is appreciated.
Thanks,
PBR
source
share