Posted on: 2/28/2011 1:46:54 AM | Views : 299

I know how use Roles in Controller: [Authorize(Roles="admin")] public ActionResult About() { return View(); }
In this situation, any one who is not "admin" can'nt vist the "About.cshtml". But what if I want anonymous can see part of the "About.cshtml"?
<p> Contents Anonmous Can See. @if(Authorize(Roles="admin")){ Contents Only Admin Can See. } </p> I know code above is wrong, But how can implement my goal in Views
...

Go to the complete details ...