【发布时间】:2016-02-24 09:20:47
【问题描述】:
我对 jquery 的一个简单的 ajax 帖子有疑问:
$.ajax({
type: 'POST',
url: "ucUploadDownloadCommand.ascx/UploadXLSFile",
data: "{}",
dataType: 'json',
contentType: "application/json; charset=utf-8",
success: function (response) {
$(".im").css('visibility', 'hidden');
},
error: function(xhr, textStatus, error){
alert(xhr.statusText);
alert(textStatus);
alert(error);
}
在代码后面(文件ucUploadDownloadCommand.ascx.vb):
<System.Web.Services.WebMethod()> _
Public Shared Sub UploadXLSFile()
Dim a As New StringBuilder()
...
End Sub
但它出错了
“禁止”错误(没有“未找到”一个)
。我怎么解决这个问题?
提前致谢。
【问题讨论】: