﻿function isNumberKey(sender, evt) {

    var charCode;
    if ((evt.which)) {
        charCode = evt.which;
    }
    else {
        charCode = evt.keyCode;
    }
    //alloewd only 0-9
    if ((charCode >= 48 && charCode <= 57) || (charCode == 9 || charCode == 8 ))
        return true;

    return false;
}

function isAllowedName(sender, evt) {

    var charCode;
    if ((evt.which)) {
        charCode = evt.which;
    }
    else {
        charCode = evt.keyCode;
    }
    //alloewd only 0-9, a-z. A-Z, DEl, BACKSPACE, <,>, HOME, END, TAB
    if ((charCode >= 48 && charCode <= 57) || (charCode >= 97 && charCode <= 122) || (charCode >= 65 && charCode <= 90) || (charCode == 9 || charCode == 37 || charCode == 39 || charCode == 8 || charCode == 36 || charCode == 35))
        return true;        
    return false;
}