M
mg
After a selection is made in the following RadioButtonList
<asp:RadioButtonList id="RadioButtonList1" runat="server">
<asp:ListItem Value="Y"></asp:ListItem>
<asp:ListItem Value="N"></asp:ListItem>
</asp:RadioButtonList>
the following script [in a client-side CustomValidator]
returns null, not "Y" or "N"
<script language="javascript">
q = document.getElementById
("RadioButtonList1").getAttribute("SelectedValue")
alert(q)
</script>
Can you tell me what I'm doing wrong?
<asp:RadioButtonList id="RadioButtonList1" runat="server">
<asp:ListItem Value="Y"></asp:ListItem>
<asp:ListItem Value="N"></asp:ListItem>
</asp:RadioButtonList>
the following script [in a client-side CustomValidator]
returns null, not "Y" or "N"
<script language="javascript">
q = document.getElementById
("RadioButtonList1").getAttribute("SelectedValue")
alert(q)
</script>
Can you tell me what I'm doing wrong?