AjaxOptions.OnSuccess Property
Gets or sets the JavaScript function to call after the page is successfully updated.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Property Value
Type: System.StringThe JavaScript function to call after the page is successfully updated.
onSuccess function signature
the following is copied from the 3.5 version community content, posted by Neil Moss
OnSuccess function signature
The method signature is:
function myOnSuccessEventHandler(ajaxContext)
{
...
}
ajaxContext provides:
get_data() method to get the response from the server.
_response property to get further details of the response.
plus others.
_response appears to be an instance of Sys.Net.XMLHttpExecutor - see http://msdn.microsoft.com/en-us/library/bb397459.aspx
e.g.
ajaxContext._response.get_statusCode() to get the http status code value of the response.
ajaxContext._response.getResponseHeader(headerName) to get the value of an http response header, e.g. "Content-Type"
OnSuccess function signature
The method signature is:
function myOnSuccessEventHandler(ajaxContext)
{
...
}
ajaxContext provides:
get_data() method to get the response from the server.
_response property to get further details of the response.
plus others.
_response appears to be an instance of Sys.Net.XMLHttpExecutor - see http://msdn.microsoft.com/en-us/library/bb397459.aspx
e.g.
ajaxContext._response.get_statusCode() to get the http status code value of the response.
ajaxContext._response.getResponseHeader(headerName) to get the value of an http response header, e.g. "Content-Type"
- 11/9/2011
- mendel n