title: How much logic is allowed in ASP.NET MVC views?
body: <p>In looking at samples of ASP.NET MVC sites, I'm seeing quite a bit of examples with embedded logic in the views, e.g.:</p>
  
  <pre><code>&lt;% if (customerIsAllowed)
     { %&gt;
  
     &lt;p&gt;nnn&lt;/p&gt;
     &lt;p&gt;nnn&lt;/p&gt;
     &lt;p&gt;nnn&lt;/p&gt;
     &lt;p&gt;nnn&lt;/p&gt;
     &lt;p&gt;nnn&lt;/p&gt;
  
  &lt;% }  else {%&gt;
  
     &lt;p&gt;nnn&lt;/p&gt;
     &lt;p&gt;nnn&lt;/p&gt;
     &lt;p&gt;nnn&lt;/p&gt;
     &lt;p&gt;nnn&lt;/p&gt;
     &lt;p&gt;nnn&lt;/p&gt;
  
  &lt;% } %&gt;
  </code></pre>
  
  <p>Although this seems wrong to me since it is the kind of thing we were trying to get away from in ASP 3.0, I have even heard in some podcasts how "a little bit of logic in view is ok" since the rest of the MVC framework is taking care of the structure that we didn't have in ASP 3.0.</p>
  
  <p>Are there any MVC conventions specifying what kind and how much logic is allowed in views?</p>