从富文本框中保存格式化文本 [英] Saving formatted text from richtextbox

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

问题描述

有什么办法可以从richtextbox中保存在数据库中的格式吗?

Is there any way, to save formatted in database from richtextbox?

我有丰富的文本框,其中的某些部分是粗体的.

I've got richtextbox and some parts of text in this are bold.

string s=richtextbox.Text 显然不起作用.

string s=richtextbox.Text obviously doesn't work.

如果我能得到这个格式化的文本,如何将它保存在 Ms Sql Server 2005 中?

And If I can get this formatted text how to save it in Ms Sql Server 2005 ?

推荐答案

尝试使用它来获取文本和所有富文本格式代码.

Try using this to get the text and all rich text format codes.

string s = richTextBox.Rtf;

这篇关于从富文本框中保存格式化文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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