0

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. :?:

2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by tayspen
0

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".

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.