jQuery Ajax Call to asp.net webmethod
<p>Can any one say 
How we can specify a Success Function in Jquery Ajax call.
Suppose I have function like below `function </p>

<pre><code>getComments(data,url,SucessFunction,FailurFunction) {

    var list = [data];
    var jsonData = JSON.stringify({ list: list });

$.ajax({
    type: "POST",
    url: url,
    data: jsonData,
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function(response, status) {
        var List = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d;
        $.each(List, function() {
            if (this['Cid'] != "1000")
                $('#' + ddlCities).append('&lt;option value="' + this['Cid'] + '"&gt;' + this['CityCode'] + '&lt;/option&gt;');
            else ($('#outerDiv').html(this['City']));

        });
    }
});
</code></pre>

<p>}
`</p>

<p>In this how can  define the success function ,error function</p>

<p>Like </p>

<pre><code>getComments(data,url,SucessFunction,FailurFunction) {

var list = [data];
var jsonData = JSON.stringify({ list: list });

$.ajax({
    type: "POST",
    url: url,
    data: jsonData,
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: SucessFunction

    }
});
</code></pre>

<p>}</p>

<p>Thanks in advance.</p>
