With Html - how Post all selected values of dropdown to controller?

0 votes
asked Mar 16, 2016 by double (530 points)
Thank you for any help

5 Answers

0 votes
answered Jun 2, 2016 by GuvYou (1,100 points)
Best answer

Changing the name of the drop down is all it takes to remedy the issue.
Drop Down List helper rendering a drop down list with no value selected.

I have achieved good results using this one mvc dropdown list not retaining selected value
–1 vote
answered Apr 6, 2016 by barletta3431 (670 points)

The form will automatically post all selected option values.
The value of this parameter will be the selected value. You can check How to get values from dropdown Select box in JSP (JSP forum at Coderanch) which seems to work a lot easy
0 votes
answered Apr 10, 2016 by Spataro_stuc (190 points)

You can not post a blank message.
Users in this community will automatically be granted access.
See the working code below from a test project of mine at set selected values in dropdown in table. | SCN java
commented Apr 12, 2016 by kretschmer (280 points)
When answering a question please:Read the question carefully
–1 vote
answered May 9, 2016 by V7950Quaglie (160 points)

NEThow to display selected values from dropdown list in textbox in asp.
commented May 10, 2016 by rudduck_598 (310 points)
This is an issue I have also spent some time looking into. Integer will return true
commented May 10, 2016 by Gur3114 (1,520 points)
This is my wild guess of where this thing is coming from. You can read more here
commented May 10, 2016 by vorhees (150 points)
Copied from a duplicate
0 votes
answered Jun 2, 2016 by thatAs (140 points)
Hence try getting the selected value from the form collection.
Most multiselect controls keep the selected list as a hidden variable.

Take a look at http://forums.asp.net/t/2004676.aspx?use+Dropdown+Multiple+Select+in+mvc for a full example
commented Jun 3, 2016 by Boardway9464 (100 points)
Take a look to this and this question

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!