title: MVC send dropdown value to databse and post it in table
body: <p>Hi i am new in mvc and I'm trying to send my dropdown value to database and post it to table, any suggest best way how it will work ? .. thanks in advance</p>
  
  <p>ContactController.cs</p>
  
  <pre><code>public ActionResult Create()
  {
  
      List&lt;SelectListItem&gt; items = new List&lt;SelectListItem&gt;();
  
       items.Add(new SelectListItem { Text = "English", Value = "0", Selected = true });
  
       items.Add(new SelectListItem { Text = "German", Value = "1" });
  
       items.Add(new SelectListItem { Text = "Spanish", Value = "2"});
  
       items.Add(new SelectListItem { Text = "Italian", Value = "3" });
  
       ViewBag.LanguageList = items;
  
      return View();
  } 
  </code></pre>
  
  <hr>
  
  <p>Create.cshtml</p>
  
  <pre><code>&lt;div class="editor-label"&gt;
      @Html.LabelFor(model =&gt; model.language)
  &lt;/div&gt;
  &lt;div class="editor-field"&gt;
      @Html.DropDownListFor(model =&gt; model.language, new SelectList(ViewBag.LanguageList))
      @Html.ValidationMessageFor(model =&gt; model.language)
  &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <p>Index.cshtml</p>
  
  <pre><code>&lt;td&gt;
      @Html.DisplayFor(modelItem =&gt; item.language)
  &lt;/td&gt;
  </code></pre>