<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function movetoNext(CurrentFieldID, nextFieldID) {
if (CurrentFieldID.value.length >= CurrentFieldID.maxLength) {
document.getElementById(nextFieldID).focus();
}
}
function numbervalidate(key) {
var presskeys = (key.which) ? key.which : key.presskeys;
if (!(presskeys == 8 || presskeys == 46) && (presskeys < 48 || presskeys > 57)) {
return false;
}
}
</script>
</head>
<body>
<form runat="server">
<asp:Label ID="lblmsg" runat="server" Text="Enter Your ATM Card Number :"></asp:Label>
<asp:TextBox ID="firsttxtbox" onkeyup="movetoNext(this,'secondtxtbox')"
onkeypress="return numbervalidate(event)"
runat="server" MaxLength="4" Width="50"></asp:TextBox>
<asp:TextBox ID="secondtxtbox" onkeyup="movetoNext(this,'thirdtxtbox')"
onkeypress="return numbervalidate(event)"
runat="server" MaxLength="4" Width="50"></asp:TextBox>
<asp:TextBox ID="thirdtxtbox" onkeyup="movetoNext(this,'fourttxbox')"
onkeypress="return numbervalidate(event)"
runat="server" MaxLength="4" Width="50"></asp:TextBox>
<asp:TextBox ID="fourttxbox" runat="server" onkeypress="return numbervalidate(event)"
MaxLength="4" Width="50"></asp:TextBox>
</form>
</body>
</html>
<script type="text/javascript">
function moveToNext(currenttxtbxid, nxttxtbxid) {
if (currenttxtbxid.value.length >= nxttxtbxid.value.maxLength) {
document.getElementById()
}
}
</script>
Design View of Default.aspx page