Controller with unknown number of parameters?
Posted
by StackPointer
on Stack Overflow
See other posts from Stack Overflow
or by StackPointer
Published on 2010-03-29T14:15:09Z
Indexed on
2010/03/29
14:23 UTC
Read the original article
Hit count: 304
Greetings!
I'm doing a Form on ASP.NET MVC 2, in my view I have a TextBox for the name, and two buttons. One of the buttons is for submit, and the other one have a function in JS, that add's another textbox, and a drop down list.
In the post controller action method, how do I get all the parameters? Here is the View Code:
<body>
<div>
<%using (Html.BeginForm())
{ %>
New Insurance Type Name:
<%=Html.TextBox("InsuranceName") %>
<div id="InsuranceDetails"/>
</div>
<div id="Buttons">
<input type="button" onclick="AddFieldForm()" value="Add Field" />
<p />
<input type="submit" value="Submit" />
<%} %>
</div>
</body>
© Stack Overflow or respective owner