I'd like to use two view engines in my asp.net mvc web application.
The first one is the Brail view engine from MVCContrib project, and another one is my custom view engine for generating javascript code.
However, I can't configure the application to use both engines. I'd like to use view file extension to discern which engine should handle the request
- .brail for Brail engine
- .json - for my custom engine
When I add two engines to the ViewEngines collection in global.asax.cs, the system is always looking for *.brail views and throws exception if it doesn't find one. It never looks for my *.json views...
Is it a problem with the ASP.Net mvc framework, with Brail view engine or with my code? How should it be handled?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…