錯誤內容: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 給拿掉就好了

 

 

 

文章標籤
全站熱搜
創作者介紹
創作者 阿駿 的頭像
阿駿

阿駿的部落格

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