this is my radio button , i want to get the value from the list through alert when i click the submit button , but value is not coming
<asp:RadioButtonList ID="Titlerbl" runat="server" CssClass="tit"
RepeatDirection="Horizontal" ValidationGroup="grt">
<asp:ListItem>MR</asp:ListItem><asp:ListItem>MS</asp:ListItem>
<asp:ListItem>DR</asp:ListItem>
</asp:RadioButtonList>
this is the java script
var radio = document.getElementById("Titlerbl").value;
for (var j = 0; j < radio.length; j++)
{
if (radio[j].checked)
alert(radio[j].value);
}
first in your markup you are assigning the id for the container list and not for the radio buttons elements.
so the rendered HTML will look like
so you can do using jquery use :