Hi,
Here are the files for a very simple project containing some user controls.
http://www.wmscanner.com/Happiness.zip
If you open the fileUserControls/StrikeDistance.ascx.cs you will be able to quickly see three event handlers that I have marked with comments.
My problem is that these event handlers are being fired on every single postback even when I don't want them to fire.
The controls contain an AJAX SliderExtension, and I want the event handlers to fire ONLY after a user has adjusted one of the sliders. Instead, the events are firing willy nilly, especially on the first couple of postbacks.
I have made the attached project very simple, to isolate the problem, so it should be pretty easy for someone expert in control lifecycles to step through and see where my code is "improveable" :)
Many, many thanks in advance, i've been working on this one problem an entire day now :)
Ben
OK, I found the problem and it was my fault. I was setting the sliderextender's value to 0.1 when it's "Decimals" property was set to zero. The slider extender was resetting the text of its bound control, and that was firing the unwanted events.
No comments:
Post a Comment