I tried to implement this using a script manager and script enabled WS but constantly kept getting the error '
I ripped my web.config apart trying to find the problem, hacked my code, moved scripts - alsorts! Searched high and low on the net but could not find the solution to the problem anywhere. I had a sample project that it worked fine in and everything was exactly the same (well almost).
Then i started looking at references. When doing this i spotted the namespace in my project which lit a light bulb. The sample project was a Web Project and there is no namespace property like on the project. So i went back to my javascript and changed the following line as follows:
Webservicename.Webmethod(prams, callback);
to
Namespace.Webservicename.Webmethod(prams, callback);
Worked a treat!
Hopefully this will save someone a days worth of head scratching and wasted time like myself.
Showing posts with label AJAX. Show all posts
Showing posts with label AJAX. Show all posts
Tuesday, 17 July 2007
ASP.NET AJAX Javscript call - Web Service is undefined Error
Posted by
Omen
at
11:39
46
comments
Labels: AJAX, ASP.NET, JAVASCRIPT, WEB SERVICE

Subscribe to:
Posts (Atom)