我们可以将aspx页面作为默认页面放在mvc4应用程序中 [英] can we put aspx page as default page in mvc4 application
本文介绍了我们可以将aspx页面作为默认页面放在mvc4应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I have a page in .aspx .Can we put this .aspx page as default page in MVC4 Application . After login through .aspx page i want to redirect to Mvc index page.
Can we do like this .We have any option for this in MVC4
推荐答案
http://www.webhostingbrowse.com/web-hosting-guides/how-to-set-default-page-in-iis7/ [ ^ ]
在MVC4中,在 RouteConfig.cs 中设置默认页面。
您可以通过此链接获取更多信息。
路由基础知识 [ ^ ]
http://www.webhostingbrowse.com/web-hosting-guides/how-to-set-default-page-in-iis7/[^]
In MVC4, set default page in RouteConfig.cs.
You can go through this link gor further info.
Routing Basics in ASP.NET MVC[^]
登录后通过.aspx页面写入.cs为
after login through .aspx page write in .cs as
Response.Redirect("http://localhost/Home/index")
或者如果.aspx在同一个项目中那么
or if .aspx is in the same project then
Response.Redirect("Home/index")
否则你可以去路由
http:// nbende .wordpress.com / 2012/08/26 / mvc-downloads / [ ^ ]
这篇关于我们可以将aspx页面作为默认页面放在mvc4应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文