Hi I'm trying to do just a simple ajax call to a method in my code behind. At this point I'm just testing, so I'm keeping it as simple as possible, but it's always erroring. I'm sure it's just a simple mistake, but I have no idea what to do. It seems really straight forward, and it should work, but when I click the button, it just pops up an alert saying "[object Object]". Here is my code, any help is greatly appreciated:

aspx file:

```
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPage.aspx.cs" Inherits="Program.TestPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <input type="button" id="btnSubmit" value="Submit" />
        </div>
    </form>
      <script type="text/javascript">
          $(function () {
              $('#btnSubmit').click(function () {
                  $.ajax({
                      type: "POST",
                      contentType: "application/json; charset=utf-8",
                      url: "TestPage.aspx/InsertData",
                      dataType: "json",
                      data: "{}",
                      success: function (data) {
                          alert(data.d);                         
                      },
                      error: function (result) {
                          alert(result);
                      }
                  });
              });
          });
    </script>
</body>
</html>

```

Code Behind:

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Text.RegularExpressions;
using System.Data.SqlClient;
using System.Web.Services;

namespace Program
{
    public partial class TestPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        [WebMethod]
        public static string InsertData()
        {
            string retMessage = "ddd";
            return retMessage;

        }
    }
}

```

**UPDATE**

Sorry everyone, turns out the issue was in my global.asax. It was intercepting the ajax request, and messing everything up. Once I made sure the HTTP was a GET in the asax file, it stopped killing my ajax request, and started working.