Textbox validation for ' in vb.net

Textbox validation for ' in vb.net
========================================================================================
Private Sub TextBox2_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Txtaddress.KeyPress
Dim i As String = e.KeyChar.ToString()
If i = "'" Then
e.Handled = True
End If
End Sub
=======================================================================================

No comments: