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

Can I recieve both html markup for page and code in the asp.net web page's source code portion in the web browser?

535


Explain the reason why the javascript validation not run on the asp.net button but run successfully on the html button?

563


What are all the various Estimation Techniques available ?

649


Define static function?

564


What is difference between session and cookie?

510






What does the hotspot class in .net do?

562


How do you declare static variable? What is its lifetime?

505


What is difference between inproc and outproc?

653


Write code to send e-mail from an asp.net application?

541


What is the difference between runtime version and version?

499


What are the options in ASP.NET to maintain state?

614


Explain the difference between webfarm and webgardens in .net?

539


What is rich control in asp.net?

517


Is asp.net different from asp? If yes, explain how?

488


Can any body provide me the sample web application in asp.net

1433