I have a form in my aspx markup.
I add to it some fields dynamically.
I submit them to a controller’s action.
How should I read them in the server side ?
Update
-
My form contains
ntextboxes. -
I have thought to use one model that will contain an
IEnumerable<FormItem>
in the client side I’ll fill it with Ajax form.
Make sense?
Yeah, great idea. So once you have defined the
FormItemclass (depending on your needs) you are ready to roll:and then:
and finally AJAXify the form:
Make sure you checkout Phil Haack’s blog post about the expected wire format for binding to lists.
Steve Sanderson’s blog post post about editing a variable length list is also a must read.