Symptom: The system always prompts that the object cannot be found.
Solution: the default WebService introduces the following namespace:
| UsingSystem; |
| UsingSystem. Data; |
| UsingSystem. Web; |
| UsingSystem. collections; |
| UsingSystem. Web. Services; |
| UsingSystem. Web. Services. Protocols; |
| UsingSystem. componentmodel; |
| [WebService (namespace ="Http://tempuri.org/")] |
| [Webservicebinding (conformsto = wsiprofiles. basicprofile1_1)] |
| [Toolboxitem (False)] |
As a result, the corresponding service cannot be found on the page. The Ms example shows that [scriptservice] is missing, and the namespace to replace is as follows:
| UsingSystem; |
| UsingSystem. Web; |
| UsingSystem. Web. Services; |
| UsingSystem. xml; |
| UsingSystem. Web. Services. Protocols; |
| UsingMicrosoft. Web. Script. Services; |
Then Replace [toolboxitem (false)] with [scriptservice.
I was just getting started with Ajax and WebService, but I still don't know much about it. Come on... [name: Ajax call WebService] [tags: Ajax]
[From alphawu. Blog]