jQuery
$(document).ready(function () {
$('#ButtonRadioValue').click(function () {
var selValue = $('input[name=radio]:checked').val();
});
});
Radio
<div id="radio" align="center">
<input type="radio" id="radio1" value="BtnNextCaseClick" name="radio" checked="checked"/><label for="radio1" style="width: 109px; margin-right:-.9em">Next</label>
<input type="radio" id="radio2" value="CloseCase" name="radio" /><label for="radio2" style="margin-right:-.9em">Close Case</label>
<input type="radio" id="radio3" value="CloseWeb" name="radio" /><label for="radio3" style="width: 109px">Close Web</label>
</div>
So, below that radio I have a button, and I want it to execute different code behind according to radio selection. That value is stored in selValue. So how can I tell onclick event to run what's inside of selValue
Button
<asp:Button ID="ButtonRadioValue" CssClass="customButton" runat="server" onclick=" js variable here" Text="Aceptar" style="width: 111px; height: 30px"/>
Thanks.
EDIT
Since there was no real need for client-side procedure. I did it from Server side with this.radio1.Checked == true
runat="server"and then you can see what is selected on the post-back?