0

Hello friends,

I am trying to use the Ajax control i.e. Scriptmanager, to get the data from the server asynchronously (without postback).

For this as per the guidance given by MSDN, I have code in my system. I have used following psuedo code...

<ScriptManager ID="...">
          <ScriptService path="ABC.asmx"/>
</ScriptManager>

<script>
     function check()
     {
          ABC.ABC.Hello(string.value, onresult);
     }

     function onresult(result)
     {
          alert (result.value);
     }
</script>

I am able to test my web service through the browser and it is giving expected result. But it is giving error that it cannot found the ABC.ABC object.

Is anything I am missing here? In other words, I am not sure how to make the class.function available in the client side javascript. Kindly let me know.

Rgds,
Deven

Edited by Ezzaral: Fixed code tag.

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by deven_a76
0

Hello adatapost,

I have written the code as per the sample defined on the given URL/sample code.

The only problem is my script is not able to identify the WebService class name and function when called from script. It gives error WebService class not found.

rgds,
Deven

0

Hello friends,

I missed to mention one more point i.e. I am running the program on my local machine. Do I need to publish the webservice on the server??

I have mentioned in my webservice the

[WebService(Namespace = [url]http://localhost:PortNo)][/url]. 

Need help urgently.

Thanks in Advance.

Rgds,
Deven

Edited by mike_2000_17: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.