Sub FnUserInput(sender as Object, args as ServerValidateEventArgs)
Dim txtInput As String = Me.TxtUser.Text.Trim
Dim txt
txt = ""
Dim c
Dim P
Const o = "~!@#$%^&*()_+=-`:""" & "<>?;,./{}[]|\*" & "'" & " "
For i As Integer = 1 To Len(txtInput)
c = Mid(txtInput, i, 1)
P = InStr(o, c)
If P > 0 Then
args.IsValid = False
End If
Next
End Sub
Dim txtInput As String = Me.TxtUser.Text.Trim
Dim txt
txt = ""
Dim c
Dim P
Const o = "~!@#$%^&*()_+=-`:""" & "<>?;,./{}[]|\*" & "'" & " "
For i As Integer = 1 To Len(txtInput)
c = Mid(txtInput, i, 1)
P = InStr(o, c)
If P > 0 Then
args.IsValid = False
End If
Next
End Sub
No comments:
Post a Comment