在MVC 3应用程序中使用ASP.Net Web表单页面 [英] Use an ASP.Net web form page in a MVC 3 application

查看:92
本文介绍了在MVC 3应用程序中使用ASP.Net Web表单页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MVC 3中有一个应用程序,该应用程序需要一个Web表单页面.
控制器可以返回ASPX页面,但是文件后面的代码在加载时会在INHERITS属性上给出错误.
请帮忙!!

关于

I have an application in MVC 3 which needs to have a Web form page.
The controller can return the ASPX page but the code behind file is giving errors on INHERITS property when loaded.
Please help!!

Regards

推荐答案

我想您必须发布完整的错误才能有人帮助.您确定您具有在MVC Web应用程序中运行Web表单页面所需的参考吗?使用来自Scott Hanselman的此链接作为起点- http://www.hanselman.com/blog/PlugInHybridsASPNETWebFormyBandSn a> [ ^ ]
I guess you will have to post the complete error for someone to help. Are you sure you have the references required to run a web forms page in your MVC web application? Use this link from Scott Hanselman as a starting point - http://www.hanselman.com/blog/PlugInHybridsASPNETWebFormsAndASPMVCAndASPNETDynamicDataSideBySide.aspx[^]


你好,

我认为您必须确保您在.aspx ViewPage代码上继承了正确的模型,否则您的目标模型可能不存在...

示例:
Hi,

I think you must be sure that you inherits the right model on your .aspx ViewPage code, or maybe your target model is not existing...

Example:
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcNW.Models.ProductCategory>>" %>



上面的示例 MvcNW.Models.ProductCategory 必须存在...

请帮忙投票...



The above example MvcNW.Models.ProductCategory must be existing...

Please do not forget to vote if could help...


这篇关于在MVC 3应用程序中使用ASP.Net Web表单页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆