ASP.NET MVC 领域:有人可以解释一下 PostBuild 发生了什么吗

发布于 2024-08-03 17:00:39 字数 289 浏览 3 评论 0 原文

我知道要开始使用区域,您必须建立父/子关系。我有几个区域设置,它们的控制器运行得很好,问题是找不到一些视图。我试图了解我的控制器上发生的情况,而我的视图中没有发生的情况。

我非常熟悉 MSDN 的链接,但仍然无法连接: http://msdn.microsoft.com/en-us /library/ee307987(VS.100).aspx

I know to start using areas, you have to establish parent/child relationships. I have a couple areas setup and their controllers are hitting just fine, the problem is some Views are not found. I'm trying to gain an understanding of what's happening to my controllers that are not happening with my Views.

I'm very familiar with MSDN's link but I'm still having a disconnect:
http://msdn.microsoft.com/en-us/library/ee307987(VS.100).aspx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

念﹏祤嫣 2024-08-10 17:00:39

我的猜测是,这可能与路线有关。检查以确保您正确注册了所有路线(使用区域时需要考虑一些额外的事情)。

Phil Haack 撰写了一篇关于 Areas 的精彩博客文章,这可能有助于解决您的问题。

编辑:下载ASP.NET MVC 源代码并单步执行代码以查看哪里有问题。这应该可以让您确切地知道问题出在哪里。

My guess is that maybe it is something to do with the routes. Check to make sure you a registering all of your routes correctly (There's a couple extra things you need to account for when you are using Areas).

Phil Haack wrote a great blog entry on Areas, which may help with your problem.

Edit: Download the ASP.NET MVC source and step through the code to see where it is breaking. This should let you know exactly where the issue is.

[浮城] 2024-08-10 17:00:39

完全用户错误,我最终创建了一个新区域,并忘记取消注释后面的项目代码中的子区域。抱歉造成误导!确保取消注释您的家长和儿童区域项目!

Total user error, I ended up creating a new area and forgot to uncomment the child area in the project code behind. Sorry for the mislead! Make sure to uncomment your parent and children area projects!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文