bsheikh
asked on
submit value in winform using Enter Button
Hi,
am using vb.net 2003, having 1 question on submitting information
i have 1 text box accepting UPC number " 000000000000 "
1 - i need to validate this input as soon as user press enter ( validation in this case mean no alphabets or any other special character and length must be lets say 12 in this case.)
2 -need to submit this information after validation o lets say SP in sql 2000
i am not sure how i can do all that on enter event .
Regards
SMB
am using vb.net 2003, having 1 question on submitting information
i have 1 text box accepting UPC number " 000000000000 "
1 - i need to validate this input as soon as user press enter ( validation in this case mean no alphabets or any other special character and length must be lets say 12 in this case.)
2 -need to submit this information after validation o lets say SP in sql 2000
i am not sure how i can do all that on enter event .
Regards
SMB
use javascript onKeyPress when e=13
oops, you can't use javascript with winforms
Protected Overrides Sub OnKeyPress(e As KeyPressEventArgs)
If e.KeyChar = CChar(13) Then
''validate input here
End If
End Sub 'OnKeyPress
If e.KeyChar = CChar(13) Then
''validate input here
End If
End Sub 'OnKeyPress
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.