There are many cases when we need to display HTML text as HTML text without applying HTML formatting.
Syntax :
Example :
Output :
Without out using of HtmlEncode method It will display Formatted HTML text.
Example :
Output :
Syntax :
Server.HtmlEncode(string)
Example :
lblProductName.Text = Server.HtmlEncode("<h1>Hi</h1>")
Output :
<h1>Hi</h1>
Without out using of HtmlEncode method It will display Formatted HTML text.
Example :
lblProductName.Text = "<h1>Hi</h1>"
Output :
Hi
No comments:
Post a Comment