About the Usage of htmlencode and urlencode ?

Answers were Sorted based on User's Feedback



About the Usage of htmlencode and urlencode ?..

Answer / 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

About the Usage of htmlencode and urlencode ?..

Answer / radha

Use the Htmlencode method to encode input parameters when
generating display.

Use the urlencode method to encode the url's recieved as
input parameters

Is This Answer Correct ?    7 Yes 4 No

Post New Answer

More ASP.NET Interview Questions

Explain how to prepare culture-specific formatting in .net.

0 Answers  


Can you explain page lifecycle in net?

0 Answers  


What is the difference between ASP Session State and ASP.Net Session State?

0 Answers  


Why we are using mvc instead of asp.net? : Asp.Net MVC

0 Answers  


How does SQL Server session state works

1 Answers   Emphasis,






7. Do you have reference list?

4 Answers   CMC, Hotel Jobs, Mannar Company, Qatar Petroleums, Swatz Oils,


What is the use of The Page.Master Property?

1 Answers  


Details on web.config and global.asax - just explain what are the sections will be there.

1 Answers   Syntel,


what is usercontrol how we can use acess the controls that are present in the usercontrol in the aspx page suppose we have 2 text boxes in a user control how u can acess the 2 textboxs in the aspx page

1 Answers  


Where the cookie value is stored?

0 Answers  


Whats the use of @ Register directives ?

4 Answers  


What’s the difference between asp.net web forms and asp.net mvc?

0 Answers  


Categories