asp:RadioButtonList

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have below.

<asp:RadioButtonList ID="rblConfirm" runat="server">

<asp:listitem value="Yes">Yes</asp:listitem>

<asp:listitem value="No">No</asp:listitem>

</asp:RadioButtonList>



In my codebehind I have
rblConfirm.Attributes["onclick"] = "javascript:EnableIndependentValues(this)";

How do I get the selected value in my Javascript?

Also why does onchange not work?
 
the radio button list is table or span (depending on layout) with radio
buttons inside. a table or span does not have a onchange event.

to get the value you need recurse thru the childNodes looking for radio
buttons. then test the checked property.

-- bruce (sqlwork.com)
 
Back
Top