Q:

Using two textboxes how do i calculate and display result in textbox2

I have two texboxes textbox1 and textbox2. I want to input a value in textbox1 which will be divided by 250 and the result will appear in textbox2 without using any button.
Example: 500/250 =2
I want textbox2 to automatically display 2 if i input 500 into textbox1.
Pls help

A:

Sudo code
define an textchage function on textbox1
purpose of this function is to read value from textbox1 and dividing the value by 250 and writing the divided value in textbox2
so code wise you need to take few steps as described below:
suppose you are using Winforms
private void textbox1_TextChanged(object sender, EventArgs e)
{
      textbox2.Text = (Convert.ToInt32(textbox1.Text)/250).ToString();      
}

