Thursday, July 30, 2009

ASP.Net RadioButtonList and JQuery

This is a short one, but I had to search around quite a bit for an answer. The internet is peppered with answers which were probably right for the version of jQuery they referred to. This sample uses jQuery 1.3.2.

Question
:
How to access the value of the ASP.Net RadioButtonList in jQuery ?

Answer:

$('#radioButtonListClientId').find('input[checked]').val();


Remember "radioButtonListClientId" referred above is the ClientID and not the ID of the server control.

Happy Coding!

ravi