title: ASP.NET MVC Views - Can I use code-behind
body: <p>I am new to MVC and I notice that the view pages can look pretty nasty with all the intermixed script tags. Does it make sense to generate the HTML in a method in the view code-behind and then just insert the string result of the method as a single bit of script?</p>
  
  <p>For example: <code>&lt;div&gt;&lt;%= GenerateTonsOfHTMLFromSomeIEnumerable() %&gt;&lt;/div&gt;</code></p>
  
  <p>Is this contrary to the MVC philosophy? Dumb for some other reason, like performance? Does it have any merit?</p>