C
Cindy
Hi all you smarties out there,
I'm having a little conundrum with my asp.net page
Scenario:
I have a form (asp.net) with no code behind (as yet).
I have placed a javascript function on a server side textbox control
to do something - eg change the words on label - when the key pressed
is the "enter" key.
I can see the label change to what i expect ----- BUT .... then the
form appears to refresh itself and the label reverts back to its
original text. (and i'm suspecting that it is performing a postback)
Question:
1. Is pressing enter and causing a postback something anyone else has
experienced ?? And if so does anyone know if it is BY DESIGN ??
2. How can I prevent the form performing a postback when the enter key
is pressed (short from not using a webform) ??
thanking you in advance =)
Cindy
I'm having a little conundrum with my asp.net page
Scenario:
I have a form (asp.net) with no code behind (as yet).
I have placed a javascript function on a server side textbox control
to do something - eg change the words on label - when the key pressed
is the "enter" key.
I can see the label change to what i expect ----- BUT .... then the
form appears to refresh itself and the label reverts back to its
original text. (and i'm suspecting that it is performing a postback)
Question:
1. Is pressing enter and causing a postback something anyone else has
experienced ?? And if so does anyone know if it is BY DESIGN ??
2. How can I prevent the form performing a postback when the enter key
is pressed (short from not using a webform) ??
thanking you in advance =)
Cindy