What is the best way to populate ViewData for the dropdownlists which are used in multiple views. If it is done in each and every Action that uses the dropdowns then we are violating the DRY principal. Also ideally we should be caching the regularly used SelectLists (e.g Countries, States etc).
Share
I’ve done it before with ActionFilters. In my case, I needed a list of sponsors on every page.
http://weblogs.asp.net/psteele/archive/2009/11/04/using-windsor-to-inject-dependencies-into-asp-net-mvc-actionfilters.aspx