Wednesday 15 May 2013

ASP.Net MVC - Showing Model data based on Roles -


I have a view that needs to show and hide details based on the user's role. I have 2 options

  1. Use an inline if statement to show and hide in view
  2. Create several partial views and use the controller Use and then load the appropriate partial view.

I am a newcomer to MVC so somebody can kindly suggest what is the best way to deal with this problem.

I would probably think differently for each role. I have found that from time to time, thoughts of each role are separated into "mango" content.


No comments:

Post a Comment