WebMethod和检索值以填充弹出窗口

时间:2013-07-10 09:43:35

标签: c# webmethod

我有以下函数(Jquery)调用WebMethod

         $(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获取字符串。基本上,我现在需要在返回值的弹出窗口中填充一个文本框。但是,警报显示未定义。

1 个答案:

答案 0 :(得分:0)

对此进行排序,我的程序存在问题。

相关问题