In my aSP.NET MVC model, I build a string, the result of this string is :
"MyName1 <br/> MyName2 <br/> MyName3"
I'd like see in my HTML page the result like this : MyNAme1开发者_如何学Go MyName2 MyName3
and not the stirng
"MyName1 <br/> MyName2 <br/> MyName3"
How can I do this ?
Thanks,
The key is outputting the string without HTML encoding. If you are using the Razor view engine:
@Html.Raw(Model.MyString)
And if you're using the WebForms view engine:
<%= Model.MyString %>
精彩评论