I'm new to MVC and am learning how it works from WebForms. In my current project I need to take data from a DropdownList that I'm filling from a database and passing via viewbag and when the "Add" submit is clicked, it adds the dropdown's selected item to a (or ListBox) and when the "remove" submit is pushed, it removes the selected item in the (or ListBox). My Code is:
@Html.DropDownList("systemlist", "Select a System")
<br />
<input type = "submit" class="btn btn-xs btn-primary" name="button_addsystem" value="Add" />
<input type = "submit" class="btn btn-xs btn-primary" name="button_removesystem" value="Remove" />
<br />
<select size = "4" id="systems_list" class="list-group" style="height:100px;width:200px;">
</select>
I am used to web forms where it would trigger a refresh and a server side event to do this and I'm struggling to relate anything in tutorials or other questions to what I am trying to do