ok, i need to be able to typ in one text box hit a button and the same text appear in the second text box. bu this time with quotes around it. Is this possible. :?:

tayspen,

Please, please, please - give your messages some careful review and thought before you post them. I'm asking very nicely: use proper spelling, punctuation, grammar, and capitilization. I hope you like Daniweb and stay around for a long time, but you'll find it much easier if you adopt a more professional posting style. Re-read and correct your messages before hitting the button! Otherwise, I'm afraid people might start to ignore you, which can be very frustrating.

Try this:

textBox2.Text = "\"" + textBox1.Text + "\"";

The backslash is the "escape" character, sometimes called the "literal" character, and allows you to specifiy characters in a string that are otherwise reserved. Since it precedes the double-quote mark, it's saying, "I wish to include a double-quote in this string".

tayspen,

Please, please, please - give your messages some careful review and thought before you post them. I'm asking very nicely: use proper spelling, punctuation, grammar, and capitilization. I hope you like Daniweb and stay around for a long time, but you'll find it much easier if you adopt a more professional posting style. Re-read and correct your messages before hitting the button! Otherwise, I'm afraid people might start to ignore you, which can be very frustrating.

Try this:

textBox2.Text = "\"" + textBox1.Text + "\"";

The backslash is the "escape" character, sometimes called the "literal" character, and allows you to specifiy characters in a string that are otherwise reserved. Since it precedes the double-quote mark, it's saying, "I wish to include a double-quote in this string".

Thank you, that really helped me out. I will make sure i use proper spelling and grammar. Thanks again!

-T

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.