I have specified a Javascript function for the "OnSuccess" event of an MVC ajax form. However, I do not want to carry out the "OnSuccess" event depending on certain conditions such as the Modelstate being invalid. How do I intercept and 开发者_Go百科and check the modelstate of the patial view OR force acomplete failure and run OnFailure event?
AND THEN, CAN I SPECIFY A DIFFERENT UpDateTarget?
Change the HttpResponse StatusCode of your Response object
[EDIT] To update a different target you can play with the response object in the event handlers More explanation of the MS ajax process here
精彩评论