【发布时间】:2012-07-11 09:44:26
【问题描述】:
每次我使用 jQuery.ajax 的 success 函数时,我都会得到以下结果:
<?xml version="1.0" encoding="utf-8"?>
<int xmlns="http://tempuri.org/">-105</int>
无论我设置什么数据类型(json、html、xml)——这就是返回的数据。 如何转义整数(本例中为 -105)?
附:也许我必须在我的 asp.net c# web 方法中更改一些东西:
[WebMethod]
[ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
public int CheckRegistrationFree(string phone)
【问题讨论】:
标签: asp.net web-services jquery