<select class="form-control " name="Choice[@ViewBag.CakeIndex].Category"> @foreach (var flavor in ViewBag.Flavour) { <option value="@flavor.id">@flavor.name</option> } </select>
cakes.Items.Remove(flavor);
yourDropdown.Items.FindByValue("ValueToFind") //pass the selected value here
List<cake> Cake = ViewBag.Cakes; <label>Cakes</label> <select class="form-control required" id="row" name="cakes"> <option value="">Choose Cake</option> @foreach (Cake cakever in Cakes) { <option value="@cakever.id">@cakever.name</option> } </select>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)