asp.net mvc - Different views based on user type -


i developing asp.net mvc application. user model has 4 properties:

  1. first name
  2. last name
  3. dob
  4. arabic name

and there 4 members login. depending on login member need design view 4 columns.

for example if member 1, want show first name , last name.

if member 2, need show first name, last name , dob.

i achieved creating 4 different views , calling views according member login. don't think way of programming.

can store detail in sql table , call in view according member login?

for example table member login id , specify column needs display him, in view read table , display model values. possible?

this role based job, once have created roles different members can add

[readonlyauthorize("a specific role")] 

attribute above field declaration


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -