I´m trying to perform a submit of a form using MVC and RAZOR, that doesn´t have a fixed Model representation, like Firstname as string, Lastname as string.

Instead, I need a page that looks like a "Insert multiple phones", so you have a txt where you enter your name (simple) and then, a variable section of the form where you click some jquery that creates 2 txts in the page (not interested in how to do this), those 2 new txts will be called Prefix and CellNumber.

I can click on my jquery and create lots of prefix and cellnumbers.

When I Click on POST button, I want to read in my controller, all data posted. In this case, should be a single property "NAME" and a list of something like {prefix, cellnumber}...

What should I do to MVC do this? This is just an example abstracting a huge need, so please I need to do it just as I asked, The page should have only one post submit (not allowed to perform partial posts of the variable part)

Thanks!

Related posts

Recent Viewed