title: Get Model type in MVC View
body: <p>I'm using <strong>MVC4 and Razor</strong> and wish to <strong>determine the Model type</strong> from within a view.  This should be easy but I'm not quite able to get the syntax correct.</p>
  
  <p>I want to do this so I can conditionally display different markup in the <code>_Layout.cshtml</code> page depending on the current view and model that it's being used in.</p>
  
  <p>It must be (I think) something along the lines of:</p>
  
  <pre><code> @if (Model.GetType() == Web.Models.AccommodationModel) { // Obviously not correct
        &lt;h1&gt;Accomodation markup here&lt;/h1&gt;
   }
  </code></pre>
  
  <p>Any suggestions much appreciated!</p>