How to pass multiple Html.DropDownList selected values from View( .aspx ) to MVC controller's action?
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
I need to pass multiple data ( probably 2 Html.DropDownList's selected values ) to MVC controller action method from MVC View ( .aspx). I think it would be from somehow Html.Hidden form , but how?
I am unable to get the selected value from Html.DropDownList and pass it as Html.Hidden("paramName", MvcStringSelectedValue) to controller's action.
My Code is :
<%: Html.DropDownList("Semester")%> <%= Html.Hidden("strSemesterToOrganize", returnedValueFromAbove)%> based on<br /> <%: Html.DropDownList("Semester")%> <%= Html.Hidden("strSemesterToBaseOn",returnedValueFromAbove)%> <%: Html.ValidationSummary(true) %> <input type="submit" value="Clone" /> <% } %>
<br/><br/>
Do I need to write the input tag of "submitt" 2 times or just only once?Regards Usman