Training Kit -

Razor HtmlHelper: @Html.DropDownListFor( SelectList() )
namespace EzPL8.Models
{
    public class MyEggs
    {
        public Dictionary<int, string> Egg { get; set; }

        public MyEggs()
        {
            Egg = new Dictionary<int, string>()
            {
                { 0, "No Preference"},
                { 1, "I hate eggs"},
                { 2, "Over Easy"},
                { 3, "Sunny Side Up"},
                { 4, "Scrambled"},
                { 5, "Hard Boiled"},
                { 6, "Eggs Benedict"}
            };
        }
    }
}
The Controller:
public ActionResult Index()
{
   var model = new EzPL8.Models.MyEggs();
   return View(model);
}
In the View convert it to a list for display
@Html.DropDownListFor( m => m.Egg.Keys, new SelectList( Model.Egg, "Key", "Value") )
To access SQL Server Configuration Manager Using Windows 8
  1. SQL Server Configuration Manager is a snap-in for the Microsoft Management Console program and not a stand-alone program
  2. SQL Server Configuration Manager does not therefore appear as an application when running Windows 8.x
  3. To open SQL Server Configuration Manager, in the Search charm, under Apps, type SQLServerManager11.msc
Top of page