Event handling in UserControl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,

I have created usercontrol which is having combobox and command button.
my requirement is, If i select some particular item in combo box, I will do
some process and i will remove this user control from my screen. When I do
this, it is successfully removing that control, but once come out that
control it is displaying
"Object reference not set to instance of object" error. If i writtern this
code in Command button then it is working correctly. I don't understand this
concept.
How to handle this situation. Please help. It is very urgent.
 
Hello!

It sounds like you're referencing some members on the removed user control.
Then again, it's just a suggestion.

If possible, please provide a more detailed description of what you're
trying to achieve. We need to see the code that throws the exception.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top