Server.Htmlencode to display tags in ASPWe can't post any HTML tags to the screen ( or to browser ) as browser will interpret then as tags and try to format the string accordingly without displaying the tag itself. To display the tag to web browser we have to use server object htmlencode.
Here is an example of htmlencode
Response.Write Server.htmlencode( "To highlight a string we have to add <b> Bold Tag </b>")The output of this is here.
To highlight a string we have to add <b> Bold Tag </b>Try to use only Response.Write without htmlencode and see the difference.
This article is written by plus2net.com team.
Be the first to post comment on this article :