i want text box only needs to allowed numeric no .in other way round . i need to adapt the following code in vb.net .let me know please .
Code:Private Sub TxtWeekNo_KeyPress(KeyAscii As Integer) If KeyAscii = 8 Or KeyAscii = 27 Or KeyAscii = 13 Then Exit Sub 'we need to allow backspace & some other key If Not (KeyAscii > 47 And KeyAscii < 58) Then KeyAscii = 0 End If End Sub




Reply With Quote