Dynamically building checkboxes in asp: table events issue

I am currently dynamically creating an asp: table that contains checkboxes these flags have a CheckChanged event as an automatic postback .

v_articleCheckBox.CheckedChanged += new EventHandler(v_articleCheckBox_CheckedChanged);

      

I store the checkbox states in the viewstate, and I rebuild the table on every page load so that it then shows that the viewstate will be applied to the checkboxes.

For every checkbox, but the first one works fine.

The odd case is that the first checkbox works on the check event, but just doesn't call the v_articleCheckBox_CheckedChanged method in the disable event

Does anyone have any ideas?

I was thinking about adding a dummy checkbox as the first record in the table and then just hiding it from the client. but that seems like a bad workaround.

0


source to share


1 answer


I'm curious: what's the problem? - splattne (Nov 27 at 11:39)
I'm curious too - JohnIdol (Nov 27 at 13:48)

I solved the problem by changing my logic so that some events are fired on a more general basis and I just avoided the problem.



I don't know why or how this happened; I just found a job that met my needs.

0


source







All Articles