How to bind Layout with Model in MVC?
How to bind Layout with Model in MVC?
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 Nov 10, 2020, 2:35 AM
- Use a Base View Model and inherit all models with that.
- Create a Action Filter (You don't need to populate model each time in every view)
https://www.sharpencode.com/article/MVC/filters-in-asp-net-mvc/actionfilter