TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Arshad Ali
NA
636
32.9k
Nested Ajax Function Call Webservice
Aug 4 2015 6:09 AM
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);
}
});
}
Reply
Answers (
3
)
NUnit Testcase with an import file for my data
How to compare value ajax nested function fetch from DB