protected void ImageButton5_Click(object sender, ImageClickEventArgs e) { T.Text = ""; T.Focus(); T1.Text = ""; T1.Focus(); T2.Text = ""; T2.Focus(); T3.Text = ""; T3.Focus(); T4.Text = ""; T4.Focus(); T5.Text = ""; T5.Focus(); T6.Text = ""; T6.Focus(); T7.Text = ""; T7.Focus(); T8.Text = ""; T8.Focus(); T9.Text = ""; T9.Focus(); }
private void textBox1_KeyDown(object sender, KeyEventArgs e) { var c = (Control)sender; if (e.KeyData == Keys.OemPeriod || e.KeyData == Keys.Decimal) { switch (c.Name) { case "T1": T2.Focus(); break; case "T2": T3.Focus(); break; case "T3": T4.Focus(); break; } e.SuppressKeyPress = true; } }