Formatting values

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.
 
J

John M Deal

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top