AutoPostBack question.

  • Thread starter Thread starter Domien Holthof
  • Start date Start date
D

Domien Holthof

Hi,

I'm having a straight HTML <input type="text"
onkeypress="CheckKey();"> within a <form runat="server">.
When I press ENTER when in the textbox, the client-side
CheckKey() function is executed but still the form or page
seems to do an AutoPostBack to the server.

Any ideas on how to avoid this postback?
Thanx a lot in advance,

Domien
 
The statement has to say "return false", and your onclick event has to say
"return CheckKey();".


Also, this is just a plain submit to the server, this is not related to the
autopostback that can happen with a dropdown.
 
Back
Top