title: Why isn't a compilation needed when updating cshtml files with .net code?
body: <p>I'm using Asp.net Mvc and I wanted to know why I don't need to compile my project when updating .net code in cshtml files?
  Now if we are talking about html\css updates then I clearly understand why a simple refresh would be enough, but how does .net code compile on the fly in these cases? </p>
  
  <p>Lets say I have a view and I want to add some c# code to it something like <code>Datetime.Now.ToString();</code><br/>
  Now typically I could add this line of code to my cshtml file, save the file, refresh the page and see the result without compiling.<br/></p>
  
  <p>If I would do the same "by the book" by adding a property to my model, assigning the <code>Datetime.Now.ToString()</code> in my controller and simply rendering the new var I would need to compile my code in order to see the changes.</p>
  
  <p>How does this magic work? If it's so simple, why can't this be done with .cs files as well?</p>
  
  <p>P.s. the same question is relevant for asp.net applications and aspx\ascx pages.</p>