Click here to Skip to main content
15,886,074 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
i have a dynamic grid/table having three column but multiple rows.
i m binding that grid from different table through ViewData & i have to insert whole grid data along with user input text into another table.
Posted

1 solution

Hi ..As i have understood your requirement that you have to create the dynamic names to input text.

for example

int i=0;
foreach( var item in list<item>)
{

@html.textbox("data.items[@i]",new{@id=@i})

}


then on submit it will post the data to controller and you can get it in a list .
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900