c# - Load a controller depending on a value in a dropdownlist -


I'm coding a C # MVC5 view, and want some help loading a specific controller drop down list .

Here is my current code:

  @ html.ActionLink ("create new", "create", ** some code here **, new {MapLocationId = model} .MapLocationId}, empty) & lt; Div class = "form-group" & gt; & Lt; Div class = "col-md-10" & gt; @ Html.DropDownList ("ItemTypes", New SelectList (Model.mapLocationItemTypes), New {@class = "control-label col-md-2"}) & lt; / Div & gt; & Lt; / Div & gt;  

mapLocationItemTypes contains the following values:

  • Item 1
  • Item 2
  • How is this the best way to code? Do I Need To Use Javascript? Is there a specific HTML MVC view attribute that can be used?

    Thanks in advance


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -