How to return error from webmethod?
<p>suppose i am going to call aspx page method decorated with webmethod. so i need to know that how to return error from my webmethod as a result jquery error portion will be invoked and show the error detail?</p>

<p>below is a sample code by which i am calling my aspx method.</p>

<pre><code>$.ajax({
    type: "POST",
    url: "./Default.aspx/GetData",
    data: "{}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: AjaxSucceeded,
    error: AjaxFailed
});

[WebMethod]
public static string GetData()
{

}
</code></pre>

<p>so please help in terms of code that how to return error from my webmethod as a result jquery error portion will be invoked and show the error detail...guide me in detail. thanks</p>
