I have a very strange problem from my point of view.
I have created a Control with a Control Template. It only have one ControlTemplate which is Content.
I create a new instance with this code:
<mc:ContainerWindow runat="server" id="ContainerWindow1">
<asp:DropDownList runat="server" id="DropDownList1"></asp:D
Now I want to get the dropdownlist from codebehind.
I then try to debug and step into my method which return the control, this works fine and I get the object returned.
If I on the other hand try to debug and step over the method, I get a NullReferenceException.
The method is overiding FindControl and return FindControl on the datacontainer I use to instatiateIn.
My questions is now:
Why is there a difference between step into and step over?
How can I get the control from the ControlTemplate?
I have used this link: http://msdn.microsoft.com/en-us/library/aa478964.aspx
I have just extended it a bit, please ask If you need some code supplied.
Thanks in advance.