I have a webpage displaying a list of elements in an HTML table. Above the list is a form that allows the user to add a new item to the list through AJAX (using Ajax.BeginForm). When the data is sent to the controller via AJAX, I add a new item to the database database and generate a new table row through the Partial View, which is then added to the existing table.
If the form for adding new elements, however, contains errors, I want to return the form to a web browser and display it.
So here is the question: is it possible to specify UpdateTargetId from the controller? At the moment, any view that I return from the controller is inserted into the same target, but I would like to update another target (i.e. another UpdateTargetId) based on any view returned by the controller.
Any help would be appreciated ...
source share