MVC - Same URL, multiple views

Posted by Amati on Stack Overflow See other posts from Stack Overflow or by Amati
Published on 2010-03-23T18:25:20Z Indexed on 2010/03/23 18:33 UTC
Read the original article Hit count: 252

Filed under:

Hi,

Is it considered bad practice to have multiple views for same URL in MVC, based on different user roles? For example: http://www.domain.com/ViewProductID/123 will show a "normal" product page for a regular user and it will show an "enhanced" (product stats, ability to edit title etc..) version to someone logged in as admin.

If it's bad practice, why? If it's ok, what's the best way to implement it? 2 separate templates or 1 template scattered with if..else?

Thanks!

© Stack Overflow or respective owner

Related posts about mvc