How can I create a view that has different displays according to the role the user is in?

后端 未结 8 1375
南方客
南方客 2020-12-04 11:22

I want to create a view that has different displays according to the role the user is in.

Should I create a different view for different roles or should I check the

8条回答
  •  北海茫月
    2020-12-04 12:26

    without researching the exact mechanism asp.net mvc uses for roles i would scream no for putting any of your business logic in the view which is what you are doing if you are checking roles in the view

提交回复
热议问题