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 intrinsic objects in asp.net?

847


What are the disadvantages of asp.net?

779


Explain about the .NET framework?

804


What is a runtime version?

702


Explain the purpose of storyboard.targetproperty.

728


What is server side in asp.net?

690


Explain managed code an un-managed code.

761


What is the difference between user control an custom control?

818


What is asp according to you?

721


Explain how asp.net page works?

753


Which is the best institute to learn Microsoft Technologies and the faculty if you Know?

1810


Explain how cookies work. Give an example of cookie abuse.

873


Can user control be stored in library?

696


Which is better viewstate or session?

691


How can you access the properties and controls of master pages from content pages?

730