PDA

View Full Version : [CLOSED] Rebind form controls with new model on ajax request / How can I update a model of a view with ajax?



PriceRightHTML5team
Jul 30, 2013, 2:56 PM
Hi,
i have a Asp.Net MVC view (razor) to which i pass a viewmodel object.


public ActionResult PageName()
{
return View(Modelobj);
}

The view consist of a formpanel. Which has many controls in it.
On Select event of a combobox (the combobox is in formpanel) i wanna make a ajax call to a actionmethod, which will return updated viewmodel object to same view. Thus, will update all controls with new values.

How can i achieve This?

Daniil
Jul 30, 2013, 3:36 PM
Hi @PriceRightHTML5team,

I think - only reload the page.

I would suggest to move the respective things into a partial view, then reload that partial view.