in my Model I have a string property Feeds with value like that:
<img src="/Images/Company/twitter.png" style="border:0; vertical-align:text-bottom;"/>
<b>
9/29/2010 1:01:33 PM
</b>
<br/>
How to get started building rich #VS2010 #VSPackage based extensions -
<a href="http://bit.ly/a8ksc1" target="_NEW">
http://bit.ly/a8ksc1
</a>
<br/> <br/>
<img src="/Images/Company/twitter.png" style="border:0; vertical-align:text-bottom;"/>
<b>
9/3/2010 9:51:26 AM
</b>
<br/>
Windows Phone 7 – Released To Manufacturing
<a href="http://bit.ly/a7HHvw" target="_NEW">
http://bit.ly/a7HHvw
</a>
<br/> <br/><br/>
<img src="/Images/Company//rss.png" style="border:0; vertical-align:text-bottom;"/>
RSS feed to busy :-(
<br/>
How can I show it like html开发者_开发知识库 in my view?? I can get it out in textArea, but i want to just to show it like html.
<%= Html.TextAreaFor(obj => obj.Feeds, 60, 40, null) %>
<%= Model.Feeds %>
you can use
<%=Html.Encode(Model.Feeds)%>
this will encode ur tags to html equivalent codes and they will not be interpreted when rendering them on the web page.
精彩评论