Last post Apr 20, 2012 12:17 PM by kedarrkulkarni
Apr 20, 2012 10:47 AM|ChristinaBu|LINK
i'm supposed to create a ASP.NET MVC 3 Web Application with a login. The login shuould be for different user (member, admin..). I'm using Visual Studio 2010 ultimate and MS SQL Server Management Studio. I created a database with two tables "user" and "roles"
and created a one-to-many relationship between "user" and "roles". the Database is saved local and created in MS SQL Server Management Studio.
My first question is: How can i get the database connected with my web application?
Apr 20, 2012 10:52 AM|kedarrkulkarni|LINK
check this article... wher I have explained creating simple form authetication in MVC
hope this helps...
Apr 20, 2012 12:01 PM|ChristinaBu|LINK
your article is great.
But i have to make a difference between the roles. Like the "members" can just see the homepage and the "admins" can see the homepage and also see a page where sey can add/change users?
How can i make it different view for different roles?
Apr 20, 2012 12:17 PM|kedarrkulkarni|LINK
in addition, you should have another table to store membership information... of roles and users and its model class
get the membership information for specific user in LogOn action...
if the user is valid role... then display add/change users link else not