How to check if a radio buttons inside asp:repeater is checked or not using javascript/jquery?
I have defined two radio buttons('Yes','No') in asp:repeater. Which are dynamic at run time, meaning that if the database returns 5 questions then for every question we have option ('Yes','No'). The image attached shows the existing design of the radio buttons
Now i want to validate these radio buttons defined in asp:repeate to check if the radio buttons is checked or not using javascript/jquery. Below is the code:

Salman BegRank #284 · 8.8K reputationPosted Feb 16, 2019, 7:11 PM EST
Ansh Saxena27 reputationPosted Feb 20, 2019, 1:56 AM EST
Thanks for your help. I have created the below function but is not working i.e. every time if the button is checked or not the output is “inside, if condition false”:
function checkRadio() {
alert("inside checkradio");
if ($("rbYes").attr("checked", false))
{
alert("inside, if condition false");
return false;
}
if ($("rbYes").is(":checked", true))
{
alert("inside, if condition true");
return true;
}
}
Salman BegRank #284 · 8.8K reputationPosted Feb 20, 2019, 2:09 AM EST
Ansh Saxena27 reputationPosted Feb 20, 2019, 2:44 AM EST
Salman BegRank #284 · 8.8K reputationPosted Feb 20, 2019, 3:29 AM EST