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.:
<% if (customerIsAllowed)
   { %&g         
        
42.
Just kidding :-)
There's no set answer to this, though a good separation of concerns is a generally accepted best practice. The debate around this can be pretty endless, and knowing the right way to do it for your particular project comes with experience I think and being able to notice "code smell" or things that don't feel right.