How to create a dynamic layout in asp.net MVC?
I have to dynamically create menus in layout how to achieve this?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Oct 11, 2020, 4:49 AM
- Create a BaseClass and inherit all your model/VM with that. (Not recommended by me)
- Create a Action Filter and override OnActionExecuted() method. (flexible and recommended)
Follow the link for detail https://www.sharpencode.com/article/MVC/filters-in-asp-net-mvc/actionfilterVikash NayakPosted Oct 11, 2020, 5:43 AM
Kiran MohantyPosted Oct 11, 2020, 4:01 AM