Link to home
Start Free TrialLog in
Avatar of bsheikh
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

Avatar of YZlat
YZlat
Flag of United States of America image

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
 
ASKER CERTIFIED SOLUTION
Avatar of ZeonFlash
ZeonFlash

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial