In a view page: like index.cshtml
@using ProjectName.Models
@model ProjectName.Models.DTO.CBDTO
@{
List<SelectListItem>listcabintype=new List<SelectListItem>();
listcabintype.Add(new SelectListItem{Text="PATIENT",Value = "PATIENT"});
listcabintype.Add(new SelectListItem { Text = "RELATIVE", Value = "RELATIVE" });
}
....your needed links here...
@using (Html.BeginForm())
{
............................Your code................
@Html.DropDownListFor(model => model.CabinType, listcabintype,new { @class = "form-control input-sm", id = "CabinType" })
..........................................Code..................
}
@using ProjectName.Models
@model ProjectName.Models.DTO.CBDTO
@{
List<SelectListItem>listcabintype=new List<SelectListItem>();
listcabintype.Add(new SelectListItem{Text="PATIENT",Value = "PATIENT"});
listcabintype.Add(new SelectListItem { Text = "RELATIVE", Value = "RELATIVE" });
}
....your needed links here...
@using (Html.BeginForm())
{
............................Your code................
@Html.DropDownListFor(model => model.CabinType, listcabintype,new { @class = "form-control input-sm", id = "CabinType" })
..........................................Code..................
}
No comments:
Post a Comment