用Enter键怎么去替代Tab键实现两个Textbox控件之间的跳转?
谢谢!!!!!

解决方案 »

  1.   

    private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
    {
    if(e.KeyChar==13)
    {
    this.textBox2.Focus();
    }
    }
      

  2.   

    利用绞死案的问题!在TextBox的事件属性中可以看到有一个keypressDown_Click事件在里面写上
     function   abc()   
      {   
            var   iekey=event.keyCode;   
            if   (iekey==13)   
            {   
                  window.Form1.TextBox3.focus();   
            }   
      }   
        
        
      <asp:TextBox   id="TextBox3"   onkeydown="abc()"   runat="server"></asp:TextBox>   
      

  3.   

            private void txtName_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
            {
                if (e.KeyValue == 13)
                {
                    e.Handled = true;
                    System.Windows.Forms.SendKeys.Send("{Tab}");
                }
            }