Any difference in using HttpUtility.HtmlEncode() and Server.HtmlEncode()? [duplicate]

StackOverflow https://stackoverflow.com/questions/18232197

  •  24-06-2022
  •  | 
  •  

Question

  1. Is there any difference between HttpUtility.HtmlEncode() method and Server.HtmlEncode() method?
  2. If not, what for one method duplicates another?
Was it helpful?

Solution 2

Look at this

StackOverflow

and may be this can help too

codeproject

Hope this help!

OTHER TIPS

1) They are the same.

2) It's a matter of convenience: Server.HtmlEncode() is readily availalble at runtime from a web page for example whereas HttpUtility.HtmlEncode() is a static method that can be used from anywhere.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top