title: MVC logic in the view
body: <p>I'm creating an MVC5 web application and was curious if what I'm doing is considered bad practice or not.</p>
  
  <p>I've already made a table with paging. This is created by a partial view that loops through the models id, code and name properties and displays them. Since I want to make a generic table I've decided to derive all models from a model base class (BusinessObjectModel) and give that to the partial view. I've modified the partial view to use reflection to get the values of every property this way the table can display every property of the model. This works great and the only thing left to do is to create a custom attribute tag to control which property is displayed in the list.</p>
  
  <p>Is putting such logic into the view considered as bad practice? Should I create a helper that would assemble this view in the controller instead?</p>