Last post May 19, 2011 05:49 PM by esayas
May 19, 2011 04:32 PM|msollicito|LINK
I was about to post to ask if someone could help me with a problem whereby html was being encoded instead of being displayed, when I found out what the problem was myself. So I thought I would post here in case anyone else has a similar problem.
So.. Session["CurrencySymbol"] contained a string with a font tag around it.. when I put this into my code
<%: Session["CurrencySymbol"] %>
The font tag came
out encoded so it displayed the literal font tag (not what I wanted at all).
if I revert to the "old" way of including variable values on a web page, the same value is NOT encoded and so I get what I wanted - my currency symbol in the desired font
another "gotcha" about the : versus = debate!!
May 19, 2011 05:49 PM|esayas|LINK
<%: is the same as <%= Html.Encode( ) %>
<% = is the same as Response.Write( )