Asp.net mvc ASP.NET MVC-入门问题
我是MVC的新手,我有一些疑问 1) 我的MVC应用程序包含Asp.net mvc ASP.NET MVC-入门问题,asp.net-mvc,Asp.net Mvc,我是MVC的新手,我有一些疑问 1) 我的MVC应用程序包含 i)Default.aspx ii)Views ... Home ... About.aspx ... Index.aspx 在执行过程中,哪个将加载第一个Default.aspx?还是关于.aspx 2) 我想显示一个将菜单项(链接按钮)列为起始页的网页。为此,我需要设计一个视图或网页吗?我认为您应该先开始阅读asp.
i)Default.aspx
ii)Views
... Home
... About.aspx
... Index.aspx
在执行过程中,哪个将加载第一个Default.aspx?还是关于.aspx
2) 我想显示一个将菜单项(链接按钮)列为起始页的网页。为此,我需要设计一个视图或网页吗?我认为您应该先开始阅读asp.net mvc书籍 为了
您应该前往,这里有许多很好的教程和示例。首先,我建议您阅读该模式的工作原理 回答您的问题:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Account", action = "LogOn", id = UrlParameter.Optional } // Parameter defaults
);
}
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
}