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

Whta are the Various steps taken to optimize a web based application (caching, stored procedure etc.) ?

564


What are the different methods of session maintenance in asp.net?

548


Explain managed code an un-managed code.

608


What is query string? What are its advantages and limitations?

520


How can you pass multiple complex types in Web API?

587






What is a url string?

558


Explain MVC model binders?

605


How does u get record no from 5 to 15 from a dataset of 100 records?

525


what are the ihttphandler and ihttphandlerfactory interfaces ?

523


What is a form tag?

515


Name the method that needs to be invoked on the dataadapter control to fill the generated dataset with data?

544


What symbol would you use to denote, the start of a code block in aspx views?

583


Why we go for mvc instead of asp.net? : Asp.Net MVC

503


What is user control in asp.net?

524


What is ashx file in asp.net?

559