asp.net mvc ViewEngineResult FindView 和虚拟路径提供程序
ViewEngineResult FindView方法在asp.net mvc中起什么作用,我们可以在这个方法中更改视图位置吗?我可以理解 VirtualPathProvider,但对 FindView 方法有一些困惑。
帮助将不胜感激。
干杯
What role ViewEngineResult FindView method plays in asp.net mvc, can we change the view location in this method. I can understand VirtualPathProvider but have some confusion about FindView method.
Help will be appreciated.
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
FindView
方法的作用是根据名称查找相应的视图。如果您想更改 ASP.NET MVC 查找视图的位置,您可以编写自定义视图引擎。这是一篇文章,其中提供了如何实现这一目标的示例。The
FindView
method has the role of locating the corresponding view given its name. You can write a custom view engine if you want to change the location where ASP.NET MVC is looking for views. Here's an article which provides an example of how to achieve this.