Refer the below article about ajax call.
You need to check the selected radiobutton as per the condition and call the web method according to the condition.
HTML
<div>
<label id="lsea1">
<input type="radio" name="iCheck" id="RBmkv" runat="server" dir="rtl" />RBMKV</label>
<label id="lsea1">
<input type="radio" name="iCheck" id="RBdvd" runat="server" />RBDVD</label>
</div>
<div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('[name=iCheck]').on('change', function () {
var checkedRadioButton = $(this)[0].value;
if (checkedRadioButton.toLowerCase() == "rbmkv") {
GetCustomers("GetCustomersPageWise", 1);
}
else if (checkedRadioButton.toLowerCase() == "rbdvd") {
GetCustomers("GetCustomersPageWisedvd", 1);
}
});
});
function GetCustomers(method, pageIndex) {
$.ajax({
type: "POST",
url: "Default.aspx/" + method,
data: '{pageIndex: ' + pageIndex + '}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function OnSuccess(response) {
//do your stuff.
},
failure: function (response) {
alert(response.d);
},
error: function (response) {
alert(response.d);
}
});
}
</script>
</div>
Code
[WebMethod]
public static string GetCustomersPageWise(string pageIndex)
{
return ""; //return as per your requirement
}
[WebMethod]
public static string GetCustomersPageWisedvd(string pageIndex)
{
return ""; //return as per your requirement
}