Right now, I am having this code and working fine. I feel this is not the right way to do. How can I do this using RadiobuttonList instead of each radio button. These are radio buttons and I am populating this using my JSON data.
<div class="radio">
<label><input name="SiteRadio" id="SiteRead" type="radio">Yes</label>
</div>
<div class="radio">
<label><input name="SiteRadio" id="SiteReadWrite" type="radio">No</label>
</div>
<div class="radio">
<label><input name="SiteRadio" id="SiteNone" type="radio">None</label>
</div>
Here is my JSON
if (response[0].CanRead && response[0].CanWrite) {
$("#SiteReadWrite").prop("checked", true)
} else if (response[0].CanRead) {
$("#SiteRead").prop("checked", true)
} else {
$("#SiteNone").prop("checked", true)
}