Is it possible to dynamically set which master page to use?
I have tried this, but it does not work out. I guess it is because of how you parse the files.
@{ var master = (parameter) ? "Master1.cshtml" : "Master2.cshtml"; } @MasterPageFile(master)
Hi Martin
We do not support dynamic master pages currently... They are read and parsed the first time the layout template is used, and cannot change runtime.
BR Nicolai
You must be logged in to post in the forum