violates the principle of maintaining business logic from a view
This is not business logic. This is the logic of the presentation when you decide whether to display something or not. This is normal there.
You can decide whether to show something or not, and set up several flags in the model (for example, you can make BaseModel or MasterModel). Then your main views, partial views themselves, or HTML helpers will conditionally render based on these flags.
As for the pure separation of problems, yes, WebForms could do this, but it was a pretty big abstraction of the underlying mechanisms. Often this leads to the fact that business logic makes sense in the code, that is, in the presentation layer, where the business logic belongs to nothing more than representations.
user151323
source share