Click here to Skip to main content
15,742,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am trying to generate dynamic menu list in Partial view. This partial view will be called from Layout Page. Name of Partial View is TopMenu, Name of controller is TopMenu Controller and name of Action Method is TopMenuToLoad.

It works fine and also generated menu from following code in partial view...

@foreach (var item in Model)
                   @Html.ActionLink(item.MenuName, item.ControllerPath)

but when I click on any of links generated it takes me to following URL :


I want to take it to:


link to my folder structure :[^]
Updated 18-Feb-15 20:28pm

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