Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Ajax post from a jquery dialogbox issue

$
0
0

Iam currently working on asp.net application and using Jquery uidialog to show customized messages.

Based on the Jquerydialog response i want to execute server side code.

below is the code iam using. Its giving Internal server error while posting to the url.

Please help me out ..

Jquery function

function SendResultsConfirmation(message) {$("#divDialog").html($("<h5>" + message + "</h5>"));$("#divDialog").dialog({
            width: '350',
            height: '175',
            modal: true,
            draggable: false,
            resizable: false,
            buttons: {
                'Yes': function () {$.ajax({
                        type: "POST",
                        url: "SendTestResults.aspx/SendResult",
                        data: "{subject:'" + $("#appResult").val() + "'}",
                        contentType: "application/json",
                        dataType: "json",
                        success: function (msg) {
                        },
                        error: function (XMLHttpRequest, textStatus, errorThrown) {
                            debugger;
                        }
                    });$(this).dialog('close');
                },
                'No': function () {$(this).dialog('close');
                }
            }

        });
};

Method definition in SendTestResults.aspx.cs page

    [WebMethod()]
    public static void SendResult(string message)
    {
    }


Please have a look
 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>