Monday, April 23, 2012

Add Value to RoutValues and keep Current Values in ASP.NET MVC 3

I have a view with two form one of them for declare rows per page. In post action I need my Url be the same and just add new parameter. at now I use like this:



[HttpPost]
public ActionResult Index(FormCollection collection) {

//Calculate Row Count

return RedirectToAction("Index", new { RC = RowCount });

}


with this implementation my all parameters lost and just RC = rowcountnumber replaced.
How can I keep parameters and just add new RC to it? what is fastest way to do it? is any performance issue here?





No comments:

Post a Comment