2013-12-21 18 views

回答

0

打開項目的屬性,然後單擊web選項卡。選擇特定頁面單選按鈕。只需輸入你想使用的網址!

0

global.asax文件

public static void RegisterRoutes(RouteCollection routes) 
     { 
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 

      routes.MapRoute(
       name: "Default", 
       url: "{controller}/{action}", 
       defaults: new { controller = "Home", action = "YOUR ACTION" } 
      ); 
     } 
0

你需要編輯文件夾「App_Start」下的文件「RouteConfig.cs」更改您的着陸頁。然後將您的控制器和操作更改爲主頁和索引。該RouteConfig.cs文件應該是這樣的:

public static void RegisterRoutes(RouteCollection routes) 
    { 
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 

     routes.MapRoute(
      name: "Default", 
      url: "{controller}/{action}", 
      defaults: new { controller = "Home", action = "Index" } 
     ); 
    } 
0

重命名現有index.cshtml或Index.aspx的到index1.cshtml /的.aspx這是在意見/家。然後把你的index.html並運行應用程序