Currently [in Preview 5], MVC Ajax (Sys.Mvc.MvcHelpers._onComplete())
just replaces the innerHTML of the updateTargetId DOM element (by calling
updateDomElement().
This ajax feature doesn't help if the action returns more than one views. Also, this doesn't even work when the view contains javascripts.
Is there a solution for this problem (other than modifying updateDomElement function) ?
I think Sys.Mvc ajax should interprete the ajax response to:
-Indentify the targets for the ajax response.
-Register / clean up scripts for the target if exist
locknguyen
0 Points
1 Post
MVC Ajax with mutiple update targets
Dec 05, 2008 03:28 PM|LINK
Hi there,
Currently [in Preview 5], MVC Ajax (Sys.Mvc.MvcHelpers._onComplete()) just replaces the innerHTML of the updateTargetId DOM element (by calling updateDomElement().
This ajax feature doesn't help if the action returns more than one views. Also, this doesn't even work when the view contains javascripts.
Is there a solution for this problem (other than modifying updateDomElement function) ?
I think Sys.Mvc ajax should interprete the ajax response to:
-Indentify the targets for the ajax response.
-Register / clean up scripts for the target if exist
Thank you
Loc
MVC Ajax
adammcraven
Member
2 Points
1 Post
Re: MVC Ajax with mutiple update targets
Jun 12, 2010 05:16 AM|LINK
Here is my solution to make any dynamically loaded JavaScript (including MVC2 Client Validation) seamlessly work:
http://adammcraventech.wordpress.com/2010/06/11/asp-net-mvc2-ajax-executing-dynamically-loaded-javascript/
<div></div>