title: How to show dropdown data selected when bind with view model
body: <p>Fiddle: <a href="https://dotnetfiddle.net/BrKBx1" rel="nofollow">https://dotnetfiddle.net/BrKBx1</a></p>
  
  <h2>Model</h2>
  
  <pre><code>public class StatesVm 
  {
      public int SelectedStateId { get; set; }
      public List&lt;State&gt; States { get; set; }
  }
  
  public class State {
      public int ID { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <h2>Controller</h2>
  
  <pre><code>public ActionResult DropDownListForDemo()
  {
      StatesVm vm = new StatesVm() { SelectedStateId = 2 };
      List&lt;State&gt; states = new List&lt;State&gt;();
      states.Add(new State() { ID = 1, Name = "West Bengal" });
      states.Add(new State() { ID = 2, Name = "Bihar" });
      states.Add(new State() { ID = 3, Name = "Orissa" });
      vm.States = states;
  
      return View(vm);
  }
  </code></pre>
  
  <h2>View</h2>
  
  <pre><code>@model CsMvcDemo.Models.StatesVm
  @{
      Layout = null;
  }
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width" /&gt;
      &lt;title&gt;DropDownListForDemo&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt;
          @Html.DropDownListFor(x =&gt; x.SelectedStateId, new SelectList(Model.States, "ID", "Name",2), "-- Select States--", new { id = "cboState" })
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  
  
  @Html.DropDownListFor(x =&gt; x.SelectedStateId, new SelectList(Model.States, "ID", "Name",3), "-- Select States--", new { id = "cboState" }) 
  </code></pre>
  
  <p>I want to show dropdown value selected as per my passing value. When I set value as 1 or 3 and run the code then state name should be changed but it is showing the old one.</p>