C# WebMethod和检索值以填充弹出窗口
我有以下函数(Jquery)调用WebMethodC# WebMethod和检索值以填充弹出窗口,c#,webmethod,C#,Webmethod,我有以下函数(Jquery)调用WebMethod $(function () { $('.view-details').click(function (e) { e.preventDefault(); $('#ticket-id').text("Ticket id: " + $(this).closest('tr').children().eq(1).html()); $.aj
$(function () {
$('.view-details').click(function (e) {
e.preventDefault();
$('#ticket-id').text("Ticket id: " + $(this).closest('tr').children().eq(1).html());
$.ajax({
type: "POST",
url: "Default.aspx/PopulatePopUp",
cache: false,
data: "{'arg':'" +$(this).closest('tr').children().eq(1).html()+"'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg)
{
alert(msg.d);
}
});
WebMethod调用数据库,并使用SqlDataReader获取字符串。基本上,我现在需要根据返回的值在弹出窗口中填充一个文本框。但是,警报显示未定义。对此进行排序后,我的产品出现问题。获取fiddler或firebug并查看您从服务器收到的响应(并将其发布在此处)。