Last post Apr 24, 2013 08:16 AM by csharpcoder
Mar 17, 2013 08:32 PM|marianux|LINK
im gathering info about MVP for migrating a web app to asp.net.
Well basically web app got differents modules that works in the same way, so there's a page for each:
- 1 for Adding a new item
- 1 Displaying / Editing Details for item
- Displying list of items
In some page, depending role from user, it hag got to show a different view, so id like to create user controls for each view.
So, in a MVP pattern, is it possible load a different view (user control) due role restriction? and if so....how?
Thanks in advance.
Mar 17, 2013 08:39 PM|Rion Williams|LINK
If you are referring to displaying a different actual "user-control" (Partial View) within an existing View based on the current user's role, you could use the following (if you are using the default Membership / Roles within ASP.NET) :
you can also include this same logic at the Controller-level to handle displaying completely different Views based on Roles as well.
Apr 23, 2013 09:39 AM|marianux|LINK
Hi, thanks for your answer, but i think that you referr to MVC pattern, i was asking about MVP pattern
Apr 24, 2013 08:16 AM|csharpcoder|LINK