How are you adding the control?
Can you show us some code?
When do you get the error?