在asp.net中调用Web服务 [英] calling web service in asp.net

查看:77
本文介绍了在asp.net中调用Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用jquery ajax调用Web服务Web方法。但我不知道以下jquery脚本中的错误是什么。任何人都可以找到错误并给出正确的解决方案。提前致谢



I am trying to call the web service web method using jquery ajax. But i dont what is the error in the following jquery script. can any one find the error and give the correct solution. Thanks in advance

$.ajax({
type: "POST",
contentType: "application/json",
url: "WebEmployee.asmx/employeeDetails",
success: function (data) {
//sucess function
},
error: function () {
//error
}

推荐答案

.ajax({
type: POST
contentType: application / json
url: WebEmployee.asmx / employeeDetails
成功: function (数据){
// 成功函数
},
错误: function (){
// 错误
}
.ajax({ type: "POST", contentType: "application/json", url: "WebEmployee.asmx/employeeDetails", success: function (data) { //sucess function }, error: function () { //error }


尝试以下解决方案

Try the following solution
script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <<script>


(document).ready(function(){
(document).ready(function () {


这篇关于在asp.net中调用Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆