I have the following code
@Html.LabelFor(model => model.UserRole)
@Html.DropDownListFor(model => model.UserRole, new List<SelectListItem>
{
new SelectListItem { Value = "Manager(SDD)" , Text = "Manager(SDD)" },
new SelectListItem { Value = "Manager(QA)" , Text = "Manager(QA)" },
new SelectListItem { Value = "Manager(Operations)" , Text = "Manager(Operations)" },
new SelectListItem { Value = "Team Lead(SDD)" , Text = "Team Lead(SDD)" },
new SelectListItem { Value = "Team Lead(QA)" , Text = "Team Lead(QA)" },
new SelectListItem { Value = "Team Lead(Operations)" , Text = "Team Lead(Operations)" },
new SelectListItem { Value = "Lead Developer(SDD)" , Text = "Lead Developer(SDD)" }
}, "Select one", new { @class = "form-control" })
Existing Role: ( @ViewBag.erole )`
Now i just want the DropDownlist's default list item to be the one returned from database, which is placed in ViewBag.erole.