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

What is asp.net futures?

0 Answers  


Why SessionID changes in every request in asp.net?

0 Answers   HCL,


what is CLR?

3 Answers   PrimeLine,


How many types of controls are there in asp.net?

0 Answers  


Is viewstate secure?

0 Answers  






How can you make sure that web api returns json data only?

0 Answers  


What are the navigation ways between pages available in ASP.NET?

0 Answers   Winsol Solutions,


what do machine key element in configuration file specify?

1 Answers   TCS,


What is css and what is it used for?

0 Answers  


What is application state?

0 Answers  


Define globalization and localization.

0 Answers  


Suppose, I have 3 pages, Page1.aspx, Page2.aspx, Page3.aspx. All pages are in diff. server. When user req. for a page, Page1.aspx opens Ist & a session established. If user req. for IIn page, second session established. Similarly, 3rd session established if user req. 3rd page. In this scenario, tot. 03 sessions are established. How we can minimize it so that it will work with only one session?

3 Answers   TCS, Wipro,


Categories