How to show stored SQL html data in a MVC3 Razor View?
Posted on 2011-09-10
I have saved data in SQL that is to be shown in an MVC3 Razor view at runtime. The data is formatted with html tags embedded. I have the data saved to a Session variable which shows the actualy HTML tags on the screen with the option 4 below. The options 1,2,3 don't show anything in the div on the screen from the cshtml view.
1. <%= Html.Display(Session["Stuff"]) %>
2. <%: Html.Display(Session["Stuff"]) %>
Thanks for any help,