ASP.NET MVC4, View returning old values to controller

I am new to MVC and ASP.NET. My requirement is, I have to display two records in my View for the firsttime and my ViewContains one 'SWAP' button. When I press this button, post action of the controller should execute and it has to take the original viewmodel and needs to swap the two records and should render the same view. This process should carryon whenever I press Swap button.For the first time when I am clicking SWAP, it is working fine. But when I am clicking for next time, my post controller action is taking original records and displaying the same.My Controller Code as shown Below.\[code\]public ActionResult Dedupe() { var selectedClients = TempData["SelectedClients"] as DedupeClientsViewModel; return this.View(selectedClients); } [HttpPost] public ActionResult Dedupe(DedupeClientsViewModel dedupeClients) { if (ModelState.IsValid) { //my functionality } return this.View(dedupeClients); }\[/code\]Is there anything that I need to do with "ModelState" to get the new data from the View.
 
Back
Top