【发布时间】:2015-12-05 12:54:33
【问题描述】:
我的页面名称
public partial class AtamaGorevDegistir : System.Web.UI.Page
{}
我的 webmethod ajax 端
var path = getLocation(location.href);
$.ajax({
type: "POST",
url: path.pathname + "/KisiBilgiDoldur",
// data: "{" + str + "}",
contentType: "application/json; charset=utf-8",
// dataType: "json",
success: function (data) {
var dd = data.d;
$('.modal-dialog').css({ width: '85%' });
$('#AtamaModal').modal({ show: true });
}
});
我的网络方法
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static string KisiBilgiDoldur(string KayitID, string TeklifID)
{
AtamaGorevDegistir atama = new AtamaGorevDegistir();
atama.AtananSuren.Value = "123";
return null;
}
但我的问题是我的 Control 是 null 。但我可以访问此方法但没有设置值并给出错误消息。为什么会这样?
【问题讨论】:
-
发送参数和数据。您的数据是评论。