English 中文(简体)
侧侧侧侧侧侧侧侧Asp.Net和MVC Razor
原标题:Side-by-Side Asp.Net and MVC Razor

我们有一个已有的 ASP.Net 网络应用程序。 我想创建一个 ASP. Net MVC Razor 应用程序, 其中两个应用程序将一起工作。 单一的主页将包含可调用.aspx 页面以及 Razor. cshtml 页面的菜单项 。

我见过一个使用MvcCcontrib可移动区域使用Routing的例子。 这个例子有.aspx 的页面(MVC不是Razor) 。

是否有一个例子可以证明这两个人肩并肩运行,而MVC就是Razor? 最好我能下载一个视频工作室解决方案,这样我才能运行。

我不确定MvcContrib方式是否是实现这一目标的最新和最佳方式。

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

问题回答

您不需要任何其他外部library 。 您可以将已有的 ASP. NET 网络格式项目转换为混合项目, 使用网络形式和 MVC 。 您需要添加所需的 MVC 组装引用, 并对网络进行一些修改 。 config 和您全部设置好了 。 Scott 拥有一个简单而惊人的“ href=” http:// www.hanselman.com/blog/ IIcomblate ASPNETMC3Intoexislationed ASPNET4WebFormsApplications. aspx" rel=“ noreferr” 博客 文章 < / a> 解释如何转换。

我写了一个说明,说明在转换 < a href=> http://www.techiesweb.net/how-to-get-add-adview-add-controller-menus- in-solution- in-explorer-When-converting-nefor-asp-net-web-for-project-to-mvc/" rel="noreferr"之后,如何在混合项目中使MVC特定上下文菜单(添加主计长/Addview)在转换后能够生效。 http://www.techiesweb.net/ how-to-to-get-ad-add-view-add- ad- control- explorer- when-converting- exp-asp-net-net-web-for-project-to-mvc/"re=" norefrer>





相关问题
WebForms and ASP.NET MVC co-existence

I am trying to make a WebForms project and ASP.NET MVC per this question. One of the things I ve done to make that happen is that I added a namespaces node to the WebForms web.config: <pages ...

Post back complex object from client side

I m using ASP.NET MVC and Entity Framework. I m going to pass a complex entity to the client side and allow the user to modify it, and post it back to the controller. But I don t know how to do that ...

Create an incremental placeholder in NHaml

What I want to reach is a way to add a script and style placeholder in my master. They will include my initial site.css and jquery.js files. Each haml page or partial can then add their own required ...

asp.net mvc automapper parsing

let s say we have something like this public class Person { public string Name {get; set;} public Country Country {get; set;} } public class PersonViewModel { public Person Person {get; ...

structureMap mocks stub help

I have an BLL that does validation on user input then inserts a parent(PorEO) and then inserts children(PorBoxEO). So there are two calls to the same InsertJCDC. One like this=>InsertJCDC(fakePor)...

ASP.NET MVC: How should it work with subversion?

So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

热门标签