How to create a dynamic layout in asp.net MVC?
I have to dynamically create menus in layout how to achieve this?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sachin SinghRank #66 · 26.2K reputationPosted Oct 11, 2020, 12:49 AM EDT
- 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 Nayak110 reputationPosted Oct 11, 2020, 1:43 AM EDT
Kiran MohantyRank #821 · 2.8K reputationPosted Oct 11, 2020, 12:01 AM EDT