User2103319870 posted
Textbox with validation first two characters should be numeric and rest of them be alphanu
You can use Regex to enforce your required format in textbox, Please find sample implementation
Javascript code
function FnFirstTwoNumericValues(x) {
//Get the textbox value
var txt = document.getElementById(x).value;
txt = txt.substr(0, 2);
//your expression
var regex = new RegExp("^[0-9]{2}[0-9A-Za-z]{0,}$");
//Check if textbox value matches with regex format
if (!regex.test(txt)) {
//if not then display the message
alert("First two Characters should be numbers");
}
}
Attach an onblur event to textbox control to the javascript function
<asp:TextBox ID="TextBox8" runat="server" onblur="FnFirstTwoNumericValues(this.id)"></asp:TextBox>