title: Looping through object in mvc view?
body: <p>I have the following code in my view :</p>
  
  <pre><code>@{
      var i = 0;
      var posts = Session["num"] as List&lt;class_project.Models.Post&gt;;
      if (posts != null)
      {
          foreach (object item in posts)
          {
               &lt;p&gt;@item&lt;/p&gt;
  
          }
      }
  } 
  </code></pre>
  
  <p>As a result of this I am getting  : a couple of class_project.Models.Post strings.</p>
  
  <p>How can I display my actual objects instead?
  I tried with item.something, which doesn't really work.</p>