Hitting Enter key clears form / not Submitting
I want the same routine to happen if I hit the Enter key or click the Submit button. Here is what I have that I thought would work. But when I hit the Enter key it clears my form.
VB Code:
Private Sub btnSubmit_KeyPress(ByVal KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 13 Then
KeyAscii = 0
EnterMemoriam()
End If
End Sub
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
EnterMemoriam()
End Sub