title: Assign a Javascript function to AjaxOptions OnSuccess property raise an error - ASP.NET MVC
body: <p>I'm using the Ajax.ActionLink helper to generate a link to delete a record. This is the code:</p>
  
  <pre><code>Ajax.ActionLink("Delete Image", "DeleteImage", new { id = item.Id },
                                                 new AjaxOptions { HttpMethod = "Delete", OnSuccess = "Test()" } )
  </code></pre>
  
  <p>I'm assign a Javascript function (Test()) to the OnSucess property because I want to do some JQuery stuff, but when I click the Delete link this error message is raised</p>
  
  <blockquote>
    <p>Microsoft JScript runtime error: 'b' is null or not an object</p>
  </blockquote>
  
  <p>in the MicrosoftAjax.js file (Line 5, Column 62099). If I remove the OnSuccess property, everything works fine (even if the Test() function is empty, the same error is raised). Thanks for your help!</p>