Server.Htmlencode to display tags in ASP

We 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.

Be the first to post comment on this article :

Post your comments , suggestion , error , requirements etc here .

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2021 All rights reserved worldwide Privacy Policy Disclaimer