In asp.net mvc 2 view i am trying to render something if true.
In code below i am trying to use Html.Encode(x) to render value into page but it does render nothing. What is wrong with if statement with html.encode?
Works
<%if (!ViewData.ContainsKey("DisplayQtyPrice")) {%>
<%: entry.Amount %>
<%}%>
Does not work
<%if (!ViewData.ContainsKey("DisplayQtyPrice")) {
Html.Encode(entry.Amount);
}%>