KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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) { %> <p>nnn</p> <p>nnn</p> <p>nnn</p> <p>nnn</p> <p>nnn</p> <% } else {%> <p>nnn</p> <p>nnn</p> <p>nnn</p> <p>nnn</p> <p>nnn</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. Are there any MVC conventions specifying what kind and how much logic is allowed in views?
Tags (comma-separated)
Save Edits
Cancel