Ue the below code ,
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script language="javascript" type="text/javascript">
function call() {
var selectedvalue;
if (document.getElementsByName('<%= RadioButtonList1.ClientID %>')) {
var radbtnList = document.getElementsByName('<%= RadioButtonList1.ClientID %>');
for (var i = 0; i <= radbtnList.length; i++) {
if (radbtnList[i].checked) {
selectedvalue = radbtnList[i].value;
alert(selectedvalue);
}
}
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem Value="1">Apple</asp:ListItem>
<asp:ListItem Value="2">Mango</asp:ListItem>
<asp:ListItem Value="3">Grapes</asp:ListItem>
</asp:RadioButtonList>
<asp:Button ID="Button1" runat="server" Text="Get Radio Button Value" OnClientClick="call()" />
</div>
</form>
</body>
</html>
Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator