Thursday, May 8, 2014

How to do auto logout and redirect to login page when session expires using asp.net?

http://www.dotnetgallery.com/kb/resource9-how-to-do-auto-logout-and-redirect-to-login-page-when-session-expires-using.aspx

Wednesday, May 7, 2014

Numeric and Decimal validations

Float

Numeric values only allowed  (With Decimal Point)
 
   
 
 
 
 Int

Numeric values only allowed  (Without Decimal Point)


 $(".allownumericwithdecimal").on("keypress keyup blur",function (event) {
            //this.value = this.value.replace(/[^0-9\.]/g,'');
     $(this).val($(this).val().replace(/[^0-9\.]/g,''));
            if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                event.preventDefault();
            }
        });

 $(".allownumericwithoutdecimal").on("keypress keyup blur",function (event) {  
           $(this).val($(this).val().replace(/[^\d].+/, ""));
            if ((event.which < 48 || event.which > 57)) {
                event.preventDefault();
            }
        });