add two textboxes with data to display in third textbox

Posted on 2010-01-07
Last Modified: 2013-12-17
I have three textboxes and a button on a form in visual C# studio express 2008.
If I enter a code a1111 in textbox1 and enter another code c2222 in textbox2. How can I code button to display both codes in textbox3 seperated by comma?
like this: a1111, c2222
Thank you
Question by:davetough
    LVL 9

    Accepted Solution

           private void button1_Click(object sender, EventArgs e)
                textBox3.Text = string.Format("{0},{1}", textBox1.Text, textBox2.Text);
    LVL 13

    Assisted Solution

    private void button1_Click(object sender, EventArgs e)
                textBox3.Text = textBox1.Text + textBox1.Text;

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now