I have a view model with a foreign key to another model, base on that, I want to create a dropDownList that will show me the selected value name and will give me all the other option so I can change it to what ever I want. this is my create form:
@using (Html.BeginForm()) {
@Html.ValidationSummary(true, "Failed creating the feed")
<fieldset>
<legend>FeedViewModel</legend>
<div class="editor-label">
@Html.HiddenFor(model => model.FeedId)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.LinkUrl)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.LinkUrl)
@Html.ValidationMessageFor(model => model.LinkUrl)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.FolderId)
</div>
<div class="editor-field">
</div>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
I want to create the dropDownList at the Last div, I already have the values form my model. How can I do that?