Hi Shambhoo,
I tried using Javascript, and here is the code for you
<asp:TextBox ID="TextBox1" runat="server" onkeydown="return MoveNext('TextBox2',event.keyCode);"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server" onkeydown="return MoveNext('TextBox4',event.keyCode);"></asp:TextBox>
<asp:TextBox ID="TextBox4" runat="server" onkeydown="return MoveNext('TextBox1',event.keyCode);"></asp:TextBox>
<script type="text/javascript">
function MoveNext(next_ctrl,_key) {
if (_key == 13) {
var _next = document.getElementById(next_ctrl);
_next.focus();
return false;
}
}
</script>
For windows application:
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
textBox2.Focus();
}
}
I hope this would help you a bit,
Regards,
RK