• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

add two textboxes with data to display in third textbox

Hello,
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
0
davetough
Asked:
davetough
2 Solutions
 
magicdlfCommented:
       private void button1_Click(object sender, EventArgs e)
        {
            textBox3.Text = string.Format("{0},{1}", textBox1.Text, textBox2.Text);
        }
0
 
zadeveloperCommented:
private void button1_Click(object sender, EventArgs e)
        {
            textBox3.Text = textBox1.Text + textBox1.Text;
        }
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now