Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は次のコードを持っています
http://bc.coverstar.com/images/error.gif
Razorコメントの後に構文エラーが発生するのはなぜですか?
正しい書き方は
@{Model.DefinitionID}
また
@Model.DefinitionID
UPD : JavaScript 内で Razor 構文を使用するには、コードを<text>タグ内にラップする必要があります。例えば:
<text>
<text>@Model.DefinitionID</text>
注:textタグは出力に表示されません。
text