I have a partial view in MVC that goes something like:
...
Inside that div there\'s a form tha
The unobtrusive Ajax library that ships with .NET MVC 3 uses callbacks that are based on the four callbacks from jQuery.ajax. However, the InsertionMode = InsertionMode.Replace from the Ajax.BeginForm method does not result in jQuery's replaceWith being called. Instead, .html(data) is used to replace the contents of the target element (and not the element itself).
I have described a solution to this problem on my blog: http://buildingwebapps.blogspot.com/2011/11/jquerys-replacewith-and-using-it-to.html