var data = {
name: name,
state: state,
city: city,
add: add,
phone: phone
};
var stringData = JSON.stringify(data);
$.ajax({
type: "POST",
url: "Customer.aspx/insertion",
data: stringData,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSucces,
error: OnError
});
function OnSucces(response) {
if (response == true) {
alert('Category Added Successfully !!!');
reset();
} else {
alert(response);
}
}
function OnError(response) {
alert(response);
}
});