I have a requirement to change the master page used based on the current culture. I can do this fairly easily by overring View, OnResultExecuting or OnActionExecuting and this works fine for the majority of my pages.
My problem is that I have several views that do not use master pages and I obviously do not want to set the master page for these views. I am having trouble finding out in code if a view has a master page – masterName is null or emtpty string in all cases.
Any ideas?
Try this…
This way if you don’t have a master page defined it will not change it 🙂