Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert a carriage return into textbox from sql data

Status
Not open for further replies.

bopritchard

Programmer
Jan 27, 2003
199
US
i return the following data from my sqlserver
"This is my \r carriage return"
i set textbox.text = to this data...

i'm expecting my text box to show

This is my
carriage return

but of course it shows

This is my \r carriage return

how do i do this
 
Use the replace function. e.g.
Code:
        Dim s As String = "This is my \r carriage return"
        Textbox1.Text = s.Replace("\r", vbCrLf)

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top