我添加MVC到一个项目,有一个旧的webform页面。这工作正常。但是,我目前有一个单独的母版页面为MVC和webforms。两个母版页产生基本相同的输出。我真的想杀死webforms一个,只是使用MVC母版页与所有我的网页,并保持干。
不是DRY已经咬了我几次,当我忘了改变两者。
我试着做明显的方式,只是指向Webform内容页面的MasterPage属性在MVC母版页。这引发一个错误,说MVC大师只能使用MVC视图。
这似乎是混合MVC和webform项目的一个很常见的问题。我的MVC主人没有做任何事情与ViewData,所以我没有看到任何原因webforms不能使用它们。
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。