title: .NET MVC Updating the View with a model property
body: <p>I used the approach described in <a href="http://odetocode.com/blogs/scott/archive/2013/03/11/dropdownlistfor-with-asp-net-mvc.aspx" rel="nofollow noreferrer">this article</a> to create a drop down.</p>
  
  <p><strong>The Model</strong></p>
  
  <pre><code>public class IceCreamFlavor
  {
      public int Id { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p><strong>The View Model</strong></p>
  
  <pre><code>public class ViewModel
  {
      private readonly List&lt;IceCreamFlavor&gt; _flavors;
  
      [Display(Name = "Favorite Flavor")]
      public int SelectedFlavorId { get; set; }
  
      public IEnumerable&lt;SelectListItem&gt; FlavorItems
      {
          get { return new SelectList(_flavors, "Id", "Name");}
      }
  }
  </code></pre>
  
  <p><strong>The View</strong></p>
  
  <pre><code>@Html.LabelFor(m=&gt;m.SelectedFlavorId)
  @Html.DropDownListFor(m =&gt; m.SelectedFlavorId, Model.FlavorItems)
  @Html.ValidationMessageFor(m=&gt;m.SelectedFlavorId)
  &lt;input type="submit" value="Submit" /&gt; 
  </code></pre>
  
  <p>This approach works fine.</p>
  
  <p><a href="https://i.stack.imgur.com/rUe2R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rUe2R.png" alt="Result"></a></p>
  
  <p>Now I want to display a property of the Model on the same view. As an example assume we had the following properties.</p>
  
  <pre><code>public class IceCreamFlavor
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public float Price { get; set; }
  }
  </code></pre>
  
  <p>Now underneath the Dropdown I need to display the price as </p>
  
  <blockquote>
    <p><strong>Price : 15.99</strong></p>
  </blockquote>
  
  <p>How can I achieve this?</p>