如何从数据库中为文本框分配报价 [英] how to assign quotation to the textbox from database

查看:114
本文介绍了如何从数据库中为文本框分配报价的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在文本框中指定引号('')

for ex



i已存储,比如数据库中的微软。

i希望从数据库中检索此值并将其分配给文本框,

但问题是引用('')显示为b / b
microsoftquotquotquotquotquotquotquotquotquotquotquotquotquotquots,我想把它作为

i将它存储在数据库即microsoft' ''''''''

解决方案

嗯...试着把这个标志@放在引号前面。

&安培; [没有任何空格]

是用双引号()编码的html。你如何存储它有什么问题。它必须有一个&符号前缀和分号后缀。



您可以使用 HttpServerUtility。 HtmlDecode方法(字符串) [ ^ ]将字符串解码为普通文本。


使用

替换(  quot '); 


Hi,
I want to assign quotation mark('') in the textbox
for ex

i have stored let say microsoft''''''''''''''s in the database
i want to retrive this value from the database and assign this to the textbox ,
But the problem is the quotation('') is dispaly as
microsoftquotquotquotquotquotquotquotquotquotquotquotquotquots ,i want it as
i have stored it in the database ie microsoft''''''''''''''s

解决方案

Hmmm... try to put this sign "@" in front of quotation.


& quot ; [without any spaces]
is encoded html for double quotes ("). There is something wrong with how you are storing it. It must have an ampersand prefix and semicolon suffix.

You can use HttpServerUtility.HtmlDecode Method (String)[^] to decode the string to normal text.


use

Replace("quot","'");


这篇关于如何从数据库中为文本框分配报价的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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