How much logic is allowed in ASP.NET MVC views?

前端 未结 5 845
一生所求
一生所求 2020-12-15 03:49

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         


        
5条回答
  •  情深已故
    2020-12-15 03:53

    if the logic pertains to the format of the view, and does not result in changes to entities or data, then I think it is OK in the view.

提交回复
热议问题