1

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
</a>
<br/>&nbsp;<br/>
<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
</a>
<br/>&nbsp;<br/><br/>
<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) %>
1
  • Okay, maybe I don't understand the problem, but can't you just print it? <%= Model.Feeds %> Commented Sep 30, 2010 at 14:20

2 Answers 2

5

<%= Model.Feeds %>

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.