用vb.net在文本框中设置文本格式 [英] format text in text box with vb.net

查看:89
本文介绍了用vb.net在文本框中设置文本格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
如何在文本框中设置所选文本的格式,然后将具有格式的文本保存在数据库中? 任何帮助

hi all
how can i format a selected text in text box and then save the text with formats in a database ???
any help

推荐答案

使用Textbox类的"selectedtext"属性(从.net 4.0开始支持),如下所示

Use ''selectedtext'' property of Textbox class (supports from .net 4.0) as follows

Dim a As String
        a = txtdemo.SelectedText
        lbltest.Text = Format(a, "\")



您可以使用插入脚本"代替"lbltest"到数据库中



In place of "lbltest" you can use insert script into database


这篇关于用vb.net在文本框中设置文本格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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