格式化TextBox数据 [英] Formatting TextBox Data

查看:85
本文介绍了格式化TextBox数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个多行TextBox。 TextBox中包含的文本将存储在SQL Server数据库中。

如何正确格式化textBox以进行数据库输入?

例如如何确保添加新行等?


谢谢。

解决方案

请解释您的问题和平台清晰。谢谢。


除了注意单引号外,你应该没问题吗?

(用两个单引号替换单引号的每个实例)


除了注意单引号外,你应该没问题吗?

(用一个单引号替换每个单引号两个单引号)



并注意sql注入


Hi,

I have a multiline TextBox. Text contained in the TextBox will be stored in a SQL Server Database.
How do I format the textBox correctly for database entry?
e.g. How do I ensure that new lines will be added, etc?

Thanks.

解决方案

Please explain your problem and platform clearly. Thanks.


Aside from watching out for single quotes, you should be fine?
(replace each instance of a single quote with two single quotes)


Aside from watching out for single quotes, you should be fine?
(replace each instance of a single quote with two single quotes)

And watch for sql injections


这篇关于格式化TextBox数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆