Given is the following MVC razor code which creates a dropdown from a list:
@Html.DropDownList(\"MyTestList\", null, new { @class = \"btn btn-default dropdown-t
I have got a bootstrap button working in ASP.net MVC with a real-life example that I am using at my current place of work.
Assign @foreach (var user in (IEnumerable)ViewBag.User) { @user.Text }
The View.user is getting the users name directly from the database. Jope this is what some of you were looking for.