Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)
I Want to known about how to send numeric value from one textbox to another textbox in same Form in Windows application C#.net

Plz Give answer in C# language
Posted
Updated 25-Jul-12 5:11am
v2
Comments
Tim Corey 25-Jul-12 11:11am    
I removed your email address from this question. You should never post your email address here. All answers will be emailed to you automatically.
Kenneth Haugland 25-Jul-12 11:36am    
You could also use binding when you load the Window
arjunpatel 6-Jul-13 8:32am    
provide me windows application project in c# 4.0

C#
private void txtName_TextChanged(object sender, EventArgs e)
{
      txtOtherName.Text = txtName.Text;
}
 
Share this answer
 
v2
To transfer the value from one textbox to another, you would do something like this:
C#
Textbox2.text = Textbox1.text;

You could put that inside a button click event so that when the button was clicked, the value was updated.
 
Share this answer
 
C#
private void Form1_Load(object sender, EventArgs e)
{
    this.textBox1.DataBindings.Add("Text", textBox2, "Text");
    this.textBox2.DataBindings.Add("Text", textBox1, "Text");

}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900