How to send the data to one page to other page using asp.net mvc -
i have 2 pages 2 grids,
in first page have 10 editable rows. , have 1 next button.
i need these 10 rows edited values next page store edited values other variable id's in next page. best way use type of situations
thanks
have editable rows inside of <form> in first view
// beginform render <form> around rowmodel html using (html.beginform('posttome', 'mycontroller')) { foreach (rowmodel row in model) { // html render out row } } then send each row instance of view model type properties match data each row
public class rowmodel { // properties here } finally post collection of types controller action. e.g.
public class mycontroller : controller { [httppost] public actionresult posttome(ilist<rowmodel> rows) { // rows } }
Comments
Post a Comment