I have created a user control and dropped it onto the designer and need to code against it in the code behind(C#). What steps do I need to perform to be able to have access to the control in the code-behind. Thanks.
If I simply declare it and set a property on it, at runtime an exception will be raised telling me... Object reference not set to an instance of an object. So what must I do to create and instance of the user control. I thought that when I dropped the control on the designer, the instance would be created automatically for me.
Is it inside annother control (an INamingContainer)? <BR><BR>Turn on tracing to see the control tree.<BR><BR>Try using MyControlIDFromHtml = (MyControlType)Page.LoadControl("MyControlIDFromHt ml")<BR>If you find it with find control, you can dig up with .Parent to see what it is contained in.<BR><BR><BR>