Hi,
Please find the below Codeing screen shot for Webservice:

Postman screen shot:
Here is the HTML calling the webservice:
Html Response:
Please help me how to retrive the response data from HTML page.
Hi,
Please find the below Codeing screen shot for Webservice:

Postman screen shot:
Here is the HTML calling the webservice:
Html Response:
Please help me how to retrive the response data from HTML page.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Jun 22, 2023, 9:47 AM EDT
Try this:
$(document).ready(function() { var url = 'YourWebService.asmx/YourWebServiceMethod'; var values = '100000003'; var queryString = '?values=' + encodeURIComponent(param1); $.ajax({ url: url + queryString, type: 'GET', contentType: 'application/json', success: function(response) { // Process the response data console.log(response); }, error: function(xhr, status, error) { // Handle error console.log(error); } }); });ashid das130 reputationPosted Jun 22, 2023, 11:03 AM EDT
@Amit Mohanty it is not reaching to API
Amit MohantyRank #112 · 20K reputationPosted Jun 23, 2023, 1:46 AM EDT
Your API method type is POST method, so your ajax type dhould be POST.
$(document).ready(function() { var url = 'YourApiUrl'; var payload = { values: '100000003' }; $.ajax({ url: url, type: 'POST', contentType: 'application/json', data: JSON.stringify(payload), success: function(response) { // Process the response data console.log(response); }, error: function(xhr, status, error) { // Handle error console.log(error); } }); });