Click here to Skip to main content
14,427,400 members
Rate this:
Please Sign up or sign in to vote.
See more:
hi all
how can i format a selected text in text box and then save the text with formats in a database ???
any help
Posted
Updated 8-Jan-20 7:41am
Comments
Sander Rossel 27-Nov-11 16:11pm
   
What kind of formats are we talking about? First thing that comes to mind is String.Format...
[no name] 27-Nov-11 20:50pm
   
Hi sirwan,
please share us the format you want.
Pete BSC 27-Nov-11 16:25pm
   
Are you using Data Binding?
Yvan Rodrigues 27-Nov-11 21:55pm
   
Windows Forms or Web Forms? or WPF?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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

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


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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100