2
Answers

Bind Dynamic navigation bars on MVC Partial Views

Rishabh Singh

Rishabh Singh

7y
353
1
I have a navigation bar which is binding from database to the layout page of asp net mvc project. Navigation bar is binding correctly. But the isuue is I have written the method for binding menu in the index function.of home controller. So menu is binding only when index page is loading where as i want to show it on all the page load as a part of my layout page.
I tried to create partial page but failde due to limited knowledge of mvc. can any one suggest me how to complete this binding as i stuck on the same issue from last 3-4 days.Please share some codes as well for better understanding .
Answers (2)
0
Rishabh Singh

Rishabh Singh

NA 10 619 7y
Sorry. But Your links didnt help me to complete my task. The issue is still open for me.
0
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 7y
Follow below links that may help you:
 
https://stackoverflow.com/questions/6718903/how-to-dynamically-load-menu-items-in-layout-or-masterpage-in-asp-net-mvc
 
http://www.dotnetcurry.com/aspnet-mvc/811/dynamic-menus-aspnet-mvc-entity-framework-code-first-jquery
 
https://forums.asp.net/t/1851625.aspx?Dynamically+Load+Menu+on+layout+page+in+MVC+razor