How to validate Coma in vb.net
-------------------------------------------------------------------------------------- Private Sub Txtname_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Txtname.KeyPress
validation1(e)
End Sub
'function for coma validation
Public Sub validation1(ByVal e As System.Windows.Forms.KeyPressEventArgs)
Dim i As String = e.KeyChar.ToString()
if i = "," Then
e.Handled = True
End If
End Sub
------------------------------------------------------------------------------------
No comments:
Post a Comment