Formatting values

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi all,

What is the best (I currently don't know of any) method to format values
which come down from a SQL Server as well as going back to it?

Regards
John.
 
Depending on what you intend to encode and for what reasons there is
HtmlEncode/HtmlDecode and UrlEncode/UrlDecode. These serve different
purposes. The first encodes data that becomes part of a web page so
that you can prevent cross site scripting attacks and/or javascript
defacement attacks. The latter encodes urls so that characters that
aren't supported by the browser are handled (and or aren't accidentally
accepted). If you are planning to go down this route because you are
attempting to prevent attacks from the outside also be sure to use some
form of parameterized query when working with the database so you don't
open yourself up to SQL Injection attacks. Hope this helps.

Have A Better One!

John M Deal, MCP
Necessity Software
 
Back
Top