0

Check first radio button with JQuery

hi, I have gone through this link above it is working fine but I have asp:RadioButton that too inside repeater control so want to checked the first radio button. the answer in above link is working fine for normal html but not for asp:radiobutton type, kindly help, thanks in advance!!

1 Answers1

0

As you haven't posted your code it's a bit of a guess but here how I would do this:

The RadioButton could be coded like this:

<asp:RadioButton ID="rb" Checked='<%# Container.ItemIndex == 0 ? true : false %>' runat="server"/>

This would check the first RadioButton the Repeater puts out.

Hope this helps.

KH S
  • 444
  • 1
  • 4
  • 8