Author: adrianthegasman | Posted on: 2/10/2009 8:26:23 AM | Views : 316

I am having great problems including a user control in my main project when the user control belongs to a dedicated 'Control' project. I have created the ascx in the control project without any difficulties and in fact I can use the user control in a webform within the Control project. In my main project, I add a reference to the control project and I can import the namespace. However, when the webform runs I get an error "Object reference not set to an instance of an object" in the code behind of the ascx for any reference to a control (in this case TextBox 1).

My ascx file is as follows:

<%@ Control Go to the complete details ...