jquery AJAX sent data in key value pair
<p>In my aspx page, i have the js like this :-</p>

<pre><code>    &lt;script language="javascript" type="text/javascript"&gt;
    $("#btnLoad").click(function () {

        var dataForAjax = "{'datakey':'hello'}"

        $.ajax({
            type: "POST",
            url: "Ajax__Demo.aspx/SendFile",
            data: dataForAjax,                
            success: function (msg) {
                alert(msg); // Problem with this line. It is not showing the value.
            }
        });

    });
&lt;/script&gt;
</code></pre>

<p>In the same webpage code behind class file ,i have the webmethod defined like this:-</p>

<pre><code>[WebMethod]        
    public static string SendFile(string key, string data)
    {
        return data;
    }
</code></pre>

<p>For some reason, i am able to get the data in the alert used on the html side. alert(msg); is giving me nothing and i am expecting to get the passed value back. In this case it should be 'Hello'. </p>

<p>I am missing something very small here, please help me out here.</p>
