views:

27

answers:

2

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;"/>&nbsp;<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&lt;/a&gt;&lt;br/&gt;&amp;nbsp;&lt;br/&gt;&lt;img src="/Images/Company/twitter.png" style="border:0; vertical-align:text-bottom;"/>&nbsp;<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&lt;/a&gt;&lt;br/&gt;&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;img src="/Images/Company//rss.png" style="border:0; vertical-align:text-bottom;"/>&nbsp;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) %>

+3  A: 

<%= Model.Feeds %>

Clicktricity
the man, that works, so simple
Ragims
A: 

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.

Muhammad Adeel Zahid