如何在c#中的asp.net中只获取多模文本框中的选定文本 [英] how to get only selected text in multimode textbox in asp.net in c#

查看:69
本文介绍了如何在c#中的asp.net中只获取多模文本框中的选定文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个多模式文本框(textbox1)和下拉列表控件。



下拉列表包含FontFamilies。



我的问题是:当我在文本框中选择文本的某些部分时,字体应该随着我选择所需的字体而改变。



请回复一个例子。

解决方案

在HTML< textarea>中,不可能有位差异样式,是我认为多行文本框转换为。如果你愿意的话,你需要使用某种形式的丰富编辑器。


这可能会有所帮助。


http://social.msdn.microsoft.com/Forums/en- US / winforms / thread / c93fdeec-0251-498c-b910-80cdf6debef3 [ ^ ]


具体要求是什么,只要想一想,如果你有一个选项然后去一个richtext编辑器。



哪个可以帮助你对文本进行良好的控制,而不仅仅是字体,你也可以使它变粗,斜体.....等

Hi All,

I've a multimode textbox (textbox1) and dropdownlist controls.

Dropdownlist contains FontFamilies.

My question is: When I select some part of text in textbox, font should change as I select required font.

Please reply with an example.

解决方案

It is not possible bit have differential styling within a HTML <textarea>, which is what I think the multiline text box translates to. You will need to use some form of rich editor if you want that.


This may help U

http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/c93fdeec-0251-498c-b910-80cdf6debef3[^]


What is the exact requirement, just think on it, and if you have an option then go for a richtext editor.

Which will help you to make a good contol over the text other than only the font you can also make it bold, italic..... etc


这篇关于如何在c#中的asp.net中只获取多模文本框中的选定文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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