Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a MVC 4 razor engine application. In this i have layout.cshtml file, in this i calling 3 view depends upon the business logic as below.

C#
<ul id="menu">
                       @if (CMS.Web.AccessControl.ADHelper.IsLibrarian || CMS.Web.AccessControl.ADHelper.IsAdmin)
                       {
                           <li>@Html.ActionLink("Parts", "Index", "Parts")</li>
                       }
                       @if (CMS.Web.AccessControl.ADHelper.IsAdmin)
                       {
                           <li>@Html.ActionLink("Users", "Index", "Users")</li>
                       }
                       @if (CMS.Web.AccessControl.ADHelper.IsLibrarian || CMS.Web.AccessControl.ADHelper.IsDFMEngineer || CMS.Web.AccessControl.ADHelper.IsAdmin)
                       {
                       <li>@Html.ActionLink("Jobs", "Index", "Jobs")</li>
                       }
                   </ul>

on the above, Parts page is associated to the partscontroller. When i click on the parts link the index method on the partscontroller is not calling.

I have some controls are loaded on the index method. so i need to call the index method when view is loaded.

Any help is appreciated.

Regards,
Vijay Muthiah
Posted
Updated 10-Jun-13 3:33am
v4
Comments
Zoltán Zörgő 7-Jun-13 6:56am    
How does it manifest, that the action i not called? What error message do you get?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900