//MVC3開始,新增Razer語法,不同於先前的<%...%>括號語法,使用At Sgin(@)敘述程式碼片段。 //在Razer檢視中,使用@*...*@進行程式註解。 //在程式碼中,要輸出內容,要加@或@(...) //在html標籤中,要輸出內容,要加@ //在程式碼中,要輸出純文字,要加@:
@if(true)
{
String strPrint = "這是測試輸出文字";
@strPrint<br/>
<span>strPring</span><br />
<span>@strPrint</span><br />
}
@{string strl = "測試";}
@(strl)輸出文字<br />
@{ string strHtml1 = "<ul><li>項目一</li></ul>";}
@Html.Raw(strHtml1)<br />









發佈留言