日期:2014-05-17 浏览次数:20698 次
[WebMethod]
public static string GetFollowInfo(string followId)
{
string followInfo = string.Empty;
OrderFollow follow = null;
if (!string.IsNullOrEmpty(followId))
{
Guid id = new Guid(followId);
follow = followService.FindById(id);
}
if (follow != null)
{
followInfo = JsonConvert.SerializeObject(follow);
}
return followInfo;
}
function edit(id) {
if (id == "" || id == undefined) {
return false;
}
$.ajax({
url: "Customer_Order_Follow.aspx/GetFollowInfo",
type: "POST",
data: "{'followId':'" + id + "'}",
contentType: "application/json;charset=utf-8",
success: function (data) {
var result = eval(data.d);
alert(result); //这里显示出来的是正确的json串{"followId":"12344","followname":"abc"}
},
error: function (msg) {
alert("Error : " + msg);
}
})
}