How to invoke WebService in ASP.net ajax

Source: Internet
Author: User
Tags net
Ajax|asp.net|web

Today I want to implement the use of JavaScript invoke WebService I first thought of ASP.net Ajax because Microsoft's things with convenience, I looked from the Internet, this thing many people have written, I took a demo from the official look at the source code, feel nothing special, So I started to write. Add a webservice.asmx and then join ScriptManager in Default.aspx and set serviecs properties



Services>

Then I've added a button and specified the click event for it.
hello world
Next, start writing the script.

There should be no problem, but when you click on the button, the wrong foot webservice undefined
I began to compare with others, in the end what is wrong, at first I thought it was a script to write the wrong, and then see webservice that part of the discovery of others as a Microsoft.Web.Script.Services; this namespace, and before the class set the [ ScriptService] Property, I think the problem may be here, plus on it!

Http://www.cnblogs.com/interboy/archive/2006/11/26/573045.html



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.