how to attach value to listbox
I'm having an issue where if they type in a new Person, then select "M" or "F" from the dropdown, in the listbox, I want both to show resulting to "John Doe M" with the example 开发者_Go百科code:
<div class="editor-field">
<%= Html.ListBox("personList")%>
</div>
<%= Html.TextBox("newPerson")%>
<select name="personInfo">
<option value="Male">M</option>
<option value="Female">F</option>
</select>
I have almost no idea what you are asking, but I'm bored and a glutton for punishment so I tried. Are you trying to do something like the following -
http://jsfiddle.net/k3BrN/
精彩评论