My problem is am create one web service in c# to GetProductId() am write simple query "select product_id from products"
and sent to List<>. but my JS code am use ajax function within ajax and how to compare nested ajax after success value from my productid.
if ($('.txtSubmited').val() == "")
{
$('.txtSubmited').val("1"); blockUI();
$(function ()
{
var _id = $('#HFProductId').val();
var product_code = $('#txtItemCode').val();
var product_type = $('#ddlProductType').val();
var visible_individually = $('#checkVisble').val();
var obj = {_ID:_id, Product_code: product_code, Product_type: product_type, Visible_individually: visible_individually };
$.ajax(
{
type: "POST",
contentType: "application/json; charset=utf-8",
url: "EntryForm.aspx/insertData",
data: JSON.stringify(obj),
dataType: "json",
success: function (data)
{
// HOW TO COMPARE FETCH ID FROM DATABASE AND MY LOCAL ID IN THIS AJAX FUNCTION
$.ajax({
type: "POST",
url: "EntryForm.aspx/GetData",
data: "{ }",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response)
{
}
});
}
Please Replay as soon as possible.
Thank You Sir......