好的,所以我一直在嘗試使用一個Tuple將多個模型傳遞給一個View,並且它的工作方式就像一個魅力一樣。問題是當我嘗試這個語法錯誤,'>'在剃刀中預期''''
@model Tuple<Smart_WEB.Models.Room, List<IGrouping<string, Smart_WEB.Models.Song>>, List<IGrouping<string, Smart_WEB.Models.Video>>>
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1003: Syntax error, '>' expected
Source Error:
Line 29:
Line 30:
Line 31: public class _Page_Views_Home_Index_cshtml : System.Web.Mvc.WebViewPage<Tuple<Smart_WEB.Models.Room { Line 32:
Line 33: #line hidden
如果我是放像:
@model Tuple<Smart_WEB.Models.Room, List<IGrouping<string, Smart_WEB.Models.Video>>>
或者
@model Tuple<Smart_WEB.Models.Room, List<IGrouping<string, Smart_WEB.Models.Song>>>
和相應的服務器端代碼工作p erfectly。
在此先感謝任何能夠幫助我的人;我即將放棄這個問題。
「@ model」完全不同於您的錯誤。你確定你正在看正確的觀點嗎? – CodeCaster
oops。我正在測試一些內容並複製了worng錯誤。謝謝!已經修復它。 – Jairo
逗號實際上是逗號,而不是一些看起來像逗號的較高的Unicode字符? – CodeCaster