close

錯誤內容:The model item passed into the ViewDataDictionary is of Type XXX but this ViewDataDictionary instance requires a model item of Type XXX


發生原因:

1.在Laoyout.cshtml 裡面想要傳入@model,但傳不進去。

解法:

把 _Layout.cshtml 裡面的 @model yourmodel 給拿掉就好了

 

 

 

arrow
arrow
    文章標籤
    C# asp.net core
    全站熱搜

    阿駿 發表在 痞客邦 留言(0) 人氣()