views:

35

answers:

1

I am creating an application for a video gallery, where I have different types of cds like audio, video, songs, movies etc. I need to give users access to only some of the cds types, for example only songs and movies.

How can i achieve this in ASP.NET MVC?

A: 
public class ViewCDsController : BaseController
{
    [Authorize(Users="A")]]
    public ActionResult MovieType
    {
        //select only the correct CDs to return to the view

        return View();
    }    
}

check this page for more information http://www.asp.net/mvc/tutorials/authenticating-users-with-forms-authentication-cs

ThanosPapathanasiou