Sunday, May 3, 2015

Check Tab/BackSpace/Delete and return false for all other keys

function CheckKey(e) {
    ///<summary>
    ///Check Tab/BackSpace/Delete and return false for all other keys
    ///</summary>
    var keyCode = e.keyCode ? e.keyCode : e.which;
    if (keyCode == 8 || keyCode == 9 || keyCode == 46)
        return true;
    else
        return false;
}

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...