vb.net 2010 - Text box to accept only numeric values -


text box accepts numeric values. have text box bank account number. want text box accept numeric values.

   `private sub data_keypress(sender object, e keypresseventargs) handles data.keypress     if (not e.keychar = chrw(keys.back) , ("0123456789.").indexof(e.keychar) = -1) or (e.keychar = "." , data.text.tochararray().count(function(c) c = ".") >  0)         e.handled = true       end if       end sub 

`


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -