将MVC添加到现有的asp.net WebSite而不是Web应用程序中 [英] Adding MVC into existing asp.net WebSite not Web Application
问题描述
Hello All,
我正在使用现有的ASP.NET WebSite项目(非ASP.NET Web应用程序)。
I想在我现有的项目之上添加MVC。我目前的项目是使用ASP.NET 4.0设计的。
我不想在解决方案中添加新的MVC项目,想要将MVC与在ASP.NET本身开发的现有功能。
我在谷歌搜索但是所有的结果集都在讨论ASP.NET Web Application和MVC,如下所示:
mixing-aspnet-webforms-and -mvc
integrate-webforms-mvc-webapi
但我更想知道解决方案仅在ASP.NET网站的基础上。
请指导我如何将MVC混合到ASP.NET网站的步骤。
提前致谢!
Vijay
你好全部,
我跟着 mvc 3一起工作。
然而它的工作完美,但只有问题是我需要输入完整的控制器URL以及参数,如果有任何或按钮点击服务器事件我需要使用Response.Redirect,如Response.Redirect(主页/索引)给控制器调用);
请帮助我如何将网站的aspx页面中的数据作为参数与我的控制器操作方法共享?不要建议我使用当前项目中严格不允许的会话,因为用户最多。
提前致谢!
维杰
Hello All,
I am working on existing ASP.NET WebSite project(Not ASP.NET Web Application).
I want to add MVC on top of my existing project. My current project which is designed by using ASP.NET 4.0.
I do not want to add new MVC project in to the solution, wanted to mix the MVC along with existing functionality developed in ASP.NET itself.
I searched in google but all the result set which was talking about ASP.NET Web Application and MVC like below:
mixing-aspnet-webforms-and-mvc
integrate-webforms-mvc-webapi
But I am more keen to know the solutions on the basis of ASP.NET website only.
Please guide me the steps on how I can mix MVC into ASP.NET website.
Thanks in advance!
Vijay
Hello All,
I followed mvc 3 in asp.net website.
However it works perfectly but only issue with this is I need to either enter complete controller url along with parameters if any or on button click server event I needed to give a controller call using Response.Redirect like Response.Redirect("Home/Index");
Please help me on how I can share data from website's aspx page to my controller action method as a parameter? Don't suggest me to use session that is strictly not allowed in my current project because of highest user's.
Thanks in advance!
Vijay
这篇关于将MVC添加到现有的asp.net WebSite而不是Web应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!