hi,
try to change like below:
<asp:linkbutton id="ButtonDelete" text="Delete" onclientclick="return confirmmessage();" value="Are You Sure!" runat="server" />
<script>
function confirmmessage()
{
if(confirm('Are you sure!'))
{
$.ajax({
type: "POST",
url: "Demo.aspx/DeleteSupplierDetails",
contentType: "application/json; charset=utf-8",
data: "{R1:'" + value+ "', R2:'" + Value+ "', R3:'" + Value+ "', R4:'" + Value + "'}",
dataType: "json",
success: function (data) {
if(data.d == true)
alert('successfully call sp');
},
failure: function (data) {
alert('sp not called');
}
});
}
else
{
return false;
}
}
</script>
// on server side
[System.Web.Services.WebMethod(true)]
public static bool DeleteSupplierDetails(string R1,string R2,string R3,string R4)
{
//call your sp
// if success
return true;
}
hope it helps.