0

I made one web service, and try to call it with Java script, I found error of unknown method "ServiceImage". This is the following code snap of JScipt

<script language="javascript" type="text/javascript">
    ServiceImage.GetImageContract(Txt, imageName, function (imgbol) {if (imgbol == true) ......    
</script>

` I am using the following code also

<asp:ScriptManager ID="ScriptManager1" runat="server" >

1
  • Please post the stack trace of the error. Also, more code would be helpful, because with just what you have given us, we have NO idea about what else is going on. Commented Sep 14, 2011 at 13:55

1 Answer 1

1

With ASP.NET MVC its probably easiest and arguably preferred to call a web service with jQuery like this:

(no paramerers passed or REST based web service)

$.get('ajax/test.html', function(data) {
  $('.result').html(data);
  alert('Load was performed.');
});

(with parameters)

$.post("test.php", { name: "John", time: "2pm" }, function(data) {
   $('.result').html(data);
   alert("Data Loaded: " + data);
});

Here's more information on jQuery ajax API jQuery Ajax API

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.