2012年10月16日 星期二

mvc路由設定方式


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
     //基本設定
     routes.MapRoute(
           "TourTourEdit",//路由名稱
           "Tour/TourEdit/{tourid}/{countyID}", //網址路徑
           new {
                 controller = "Tour",
                 action = "TourEdit", 
                 tourid = "",
                 countyID = "" }
                );

    網址長這樣:/Tour/TourEdit/30/1

    再來看看Action
    public ActionResult TourEdit(int? tourid, int?countyID)
    {
    }

Visual Studio JS intellisense 失效解決方式

  試了好久,發現到工具>選項>IntelliCode js項目設定啟用,重新開啟VS就正常了! 後來發現是TypeScript3.2版有問題停用,使用4.3版的TypeScript即可