-1

I have a ASMX web service, which has the ability to return a string containing HTML code.

Is is possible using JQuery to make a call to this service, get the string response (HTML code), and then using JQuery update the page making the call within a DIV on my page ?

The call to the web service would be made when the page loads.

neildt
  • 5,101
  • 10
  • 56
  • 107

1 Answers1

1

I don't know how ASMX web service look like, but in jquery you can just use ajax for this:

$.get('service_url', function(response) {
    $('#your_div_id').html(response);
});

if ASMX need to POST something you can use post function

$.post('service_url', {data: 'someData'}, function(response) {
    $('#your_div_id').html(response);
});

if it need string (or xml) then use string instead of object.

jcubic
  • 61,973
  • 54
  • 229
  • 402