Good After Noon Sir,
Sir i am created one webMethod to read data for the data reader and i call to ajax function but not received or get my product id form the data reader. code is following. i am try to call this webmethod Nested ajax function but not get output please help me.
Thanks you....
SqlConnection SqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["eLabSysCstr"].ToString());
SqlCommand ocmd = new SqlCommand("pr_get_products", SqlConn);
try
{
ocmd.CommandType = "select * from product";
ocmd.Connection.Open();
SqlDataReader odr = ocmd.ExecuteReader();
if (odr.Read())
{
txtItemCode.Text = odr["product_code"].ToString();
}}
var _id = $('#HFProductId').val();;
$.ajax(
{
type: "POST",
contentType: "application/json; charset=utf-8",
url: "EntryForm.aspx/insertData",
data: {},
dataType: "json",
success: function (data)
{
function getid(prod_id)
{
$.ajax({
type: "POST",
url: "EntryForm.aspx/GetDetails",
data: "{ 'Product_Id': '" + prod_id + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response)
{
// BindTable(response.d);
console.log(prod_id);
},
failure: function (msg)
{
// alert(msg);
}
});
}

Manas MohapatraRank #182 · 13.2K reputationPosted Aug 4, 2015, 2:20 AM EDT
Arshad AliRank #2,660 · 522 reputationPosted Aug 5, 2015, 10:46 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts