I'm making an ajax call to a webmethod and I'm getting the error "unexpected Token >" I'm not sure why I'm getting this.. Any ideas?

function addToQueue(me) {

    if (validateTimeFrame()) {
        $.ajax({
            method: "POST",
            url: "GenerateReportModal.aspx/AddToPrintQueue?id=" + $('#patientNum').val(),
            data: {buttonID: me.id},
            dataType: "json",
            success: function (data, textStatus, jqXHR) {
                alert(data);
                $('#GenerateReportModal').dialog('close');
            },
            error: function (jqXHR, textStatus, errorThrown) {
                console.log(errorThrown + ' ' + textStatus);
                console.log(jqXHR);
                $('#GenerateReportModal').dialog('close');
            }
        });
    }
}

<----------------------------------------------->

    [WebMethod]
    public string AddToPrintQueue(string buttonID)
    {
        try
        {
            var deIdentify = 0;
            var adminUserNum = Int32.Parse(Session["AdminUserNum"].ToString());

            if ((Session["AdminUserNum"].ToString() == "6460" || Session["AdminUserNum"].ToString() == "6537" || Session["AdminUserNum"].ToString() == "7885") && (Session["ClinicalDataAdmin"].ToString() == "1" || Session["AccountAdmin"].ToString() == "1" || Session["SystemAdmin"].ToString() == "1"))
                deIdentify = (cbDeIdentify.Checked == true) ? 1 : 0;
            else
                deIdentify = 0;

            switch (buttonID)
            {
                case "FollowUpAddtoQueue":
                    FollowUpAddToQueueClass(deIdentify);
                    break;
                case "WearTimeAddToQueue":
                    WearTimeAddToQueueClass(deIdentify);
                    break;
                case "TrendsAddToQueue":
                    TrendsAddToQueueClass(deIdentify);
                    break;
                case "EndOfUseAddToQueue":
                    EndofUseAddToQueueClass(deIdentify);
                    break;
            }
        }
        catch
        {
            return "There was an issue, we appologize for the inconvenience";
        }

        return "Added to print queue";
    } 

<---------------------------------------------------->

<asp:Button runat="server" OnClientClick="return addToQueue(this); return false;" CssClass="button" ID="EndOfUseAddToQueue" Width="150" Text="<%$ Resources:PatientDetail, btnModAddtoQueue %>" />

Related posts

Recent Viewed