I’ve got a project I’m working on where I need to put a RadioButton inside a ListView, and have them all have the same GroupName. (can’t use RadioButtonList, long story).
Anyway, this seems to be a well known bug in .NET, so I’ve implemented the solution found here:
ASP.NET RadioButton messing with the name (groupname)
This works perfectly, but with one small bug which undoubtedly will come back to bite me. If I click one radio button, and then click another while the javascript function is still running and has not completed; I can get 2 radiobuttons in the same group selected.
Any ideas? If you need clarification; leave me a comment and I’ll update my post.
EDIT: I believe I fixed my own issue here. See my posted answer below.
Turns out I was misguided here.
Later on in the page lifecycle; I was adding an additional onclick event that was overwriting the previous value.
In the following example:
the onlcick attribute is set to “test2”; test1 is lost.
I ended up fixing it by appending to the existing attribute; see below:
This works without issue.