none
Formatting input string from TextBox

    Question

  • Hello!

     

    I have a multiline textbox in my WinForm.

    I want to maximise the lines in the textbox to 5 lines, and I also want to format the input string before I send it to database - for each line in the textbox I want to add special characters, f.e.x. if the user enters this text into the textbox:

     

    "This is the first line in the textbox

    This is the second line in the textbox

    This is the third line in the textbox"

     

    ... I want to format the text in this way: "\This is the first line in the textbox\\This is the second line in the textbox\\This is the third line in the textbox" etc.

     

    Anyone who had done something similar, or have an idea for a clean and simple code to do this?

    Also, how do I maximise the lines in the textbox to a specific number?

     

    Thanks!

    JaneVDoe

    Saturday, January 12, 2008 3:53 PM

Answers