OnCheckedChanged won't fire when turning CheckBox OFF

C

Chris Heinrich

I have inherited the CheckBox control. It used to work just fine. I just
now noticed that when I turn an ON checkbox to OFF, the server does not seem
to recognize that and it doesn't even trigger the OnCheckedChanged event
handler. When I am going from OFF to ON, it works fine. But once the
checkbox is on, I'm stuck. I have absolutely no idea how or when this
started. I'm still on the original .NET framework and I have never made any
changes to it. And I don't know what I could have introduced in my code to
cause such unexpected behavior. Any ideas? Thanks
 
C

Chris Heinrich

I solved my problem. And the solution is worth noting.

In my inherited CheckBox, I had overridden the OnPreRender event handler.
But I neglected to call the base.OnPreRender(e), which seemed to be the
problem.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top