如何在sql server中使用富文本框插入超链接文本
我有一个富文本框我想在sql server中插入一个超链接的文本,所以,请帮助我。
i have a rich textbox i want to insert a text which is hyper linked in sql server so, please help me.
虽然我在数据库中存储数据,但它只接受简单的数据。它不接受像粗体这样的html标签。
while i am storing data in database but it accepting only simple data.b ut it is not accepting html tags like bold.
这取决于数据库类型。保存rtf / html数据的字段应为:BLOB,CLOB,MEMO数据类型...
请参阅:
http://www.datanamic.com/support/storing-rtf-in-db.html 一> [ ^ ]
在SQL Server数据库中存储RTF数据 [ ^ ]
使用格式化将富文本框的数据存储到数据库 [ ^ ]
http://stackoverflow.com/questions/15983278/storing-data-of-rich-text-box-to -database-with-formatting [ ^ ]
It depends on database type. The field which holds rtf/html data should be: BLOB, CLOB, MEMO data type...
Please see:
http://www.datanamic.com/support/storing-rtf-in-db.html[^]
Store RTF Data in a SQL Server Database[^]
Storing data of rich text box to database with formatting[^]
http://stackoverflow.com/questions/15983278/storing-data-of-rich-text-box-to-database-with-formatting[^]
您应该先对HTML标记进行编码,然后将其发送到数据库中存储,并在发布时对其进行解码。想要将它们显示在UI中。
这是一个关于网络编码的链接:http://demo.nickname.net/demo/testpak/encode.pl [ ^ ]
You should encode the HTML tags before to send them for storing in your database, and to decode them back when you want to show them into the UI.
Here is a link about web encoding: http://demo.nickname.net/demo/testpak/encode.pl[^]