Is it possible to get the currently used ViewEngine from the ControllerContext or the ViewEngineCollection? I would like to be able to do say the following ViewEngines.GetCurrent. I know that I can make an extension for that method but I have no idea on how to implement this.
Is it possible to get the currently used ViewEngine from the ControllerContext or the
Share
You can use
ViewEngineCollectionto look up theViewEngineassociated with a particular view.See here for more info.