、私はコード@{Html.RenderPartial("_Partial1.cshtml");}
を持っている、と私の部分の上に、私は、HTML文字列があります:私はいくつかのCSSのエラー・スタイルで出力abc
したいASP.NET MVCでHTML文字列をレンダリングするには?私のメインページで
@{
// The string is actually dynamic, not static. This is here for simplicity
string abc="<div class=\"error\">abc</div>";
}
@abc
を、私は実際に<div class="error">abc</div>
だ - もちろん、 、スタイルはありません。文字列ではなくHTMLソースコードとして解釈させるにはどうすればよいですか?
http://stackoverflow.com/questions/4281424/asp-net-mvc-razor-output-html-string-non-ecaped – adt
「