Design First Datetime Key. My scaffolded controller is finding MM/dd/yyyy instead of dd/MM/yyyy

后端 未结 1 1589
情深已故
情深已故 2021-01-25 14:36

Would like some help please:

Design First (Access Conversion) Composite Key is CalendarDate and Round.

From Index.cshtml


        @f         


        
1条回答
  •  故里飘歌
    2021-01-25 14:54

    Thanks to Yas Ikeda for the following: The problem is to do with '/' in the urls. On the Index View I have changed the link from:

    @Html.ActionLink("Edit", "Edit", new { CalendarDate = item.CalendarDate.ToString("dd/MM/yyyy"), Round = item.Round })
    

    to

    Edit 
    

    This fixes the routing problem and the Edit now works ok.

    0 讨论(0)
提交回复
热议问题