I need to either redirect user or show not authorized page according to usertype of the logged in user.
Here is some which would give you an idea.
public ActionResult Index() { if (Request.Cookies["isadmin"].Value != "true") return View("NotAuthorized","Index"); else return View(); }
Here I have created new view with NotAuthorized as view name and projectname.Models.NotAuthorized as strongly type view.
after building and running the project,it give me following error.
Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage'.
Thanks in advance. Anil