About the Usage of htmlencode and urlencode ?

Answer Posted / kumar

HTMLEncode: converts the data to valid HTML format using
HTML escape sequences.

eg: If you want to print "<b>hi</b>" on the screen, by
default <b> & </b> will be treated as HTML tags for bolding
the content. But HTMLEncode will use the escape sequences
and print <b> instead of treating that as a HTML tag.

UTLEncode: converts the string to valid URL format using
URL escape sequences for example %20 will be replaces if
you have a space in the data and

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between GridView and Repeater controls in ASP.NET?

579


Define static function?

570


What are ASHX files?

603


Tell me what is the request flow used for asp.net mvc framework? : asp.net mvc

556


Can the validation occurs in server-side or client-side? If the validation occurs why should we do?

603






What are session objects?

514


Describe paging in asp.net?

676


What is difference between Lambda Expression and LINQ in ASP.NET?

545


What is meant by ispostback in asp net?

545


Describe the method to create a permanent cookie?

584


What is the equivalent of date() and time() in asp.net?

517


Define the term Scavenging in Caching?

584


What is the difference between CC and BCC?

618


Can we use MSSql as backend in asp.net...if yes then How.?

583


What do you mean by View State and what is its role?

538