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

Recommended Answers

All 3 Replies

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.