MVC3 未在区域中找到视图
我的项目中有一个区域(供管理员使用)。
我希望能够在管理区域中使用名为 Index.cshtml 的视图,但我的应用程序始终显示主项目的 Index.cshtml 视图(不在单独的区域中)。
如果我将管理区域中的视图名称更改为其他任何地方都不存在的名称,它就可以正常工作。
我缺少什么?一定是很简单的事情!
答案(可能)
有点神秘,但似乎可能存在某种奇怪的缓存问题。我重新启动了网络服务器,现在它工作正常了。
感谢所有回复的人
I have one area in my project (for admin).
I want to be able to use a view called Index.cshtml in the Admin area but my app always displays the Index.cshtml view for the main project (which isn't in a seperate area).
If I change the name of the view in the admin area to a name that doesn't exist anywhere else it works fine.
What am I missing? It must be something simple !
Answer (probably)
Bit of a mystery but it seems that maybe there was some sort of weird caching problem. I restarted the web server and now it works fine.
thanks to all who responded
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回答了我自己的问题,将其从未回答的列表中删除。
有点神秘,但似乎可能存在某种奇怪的缓存问题。我重新启动了网络服务器,现在它工作正常了。
感谢所有回复的人
Answered my own question to remove it from the unanswered list.
Bit of a mystery but it seems that maybe there was some sort of weird caching problem. I restarted the web server and now it works fine.
thanks to all who responded