problem while pressing ENTER on a web page.
Dear All,
I have V2 2005 Framework 2.0, On a web page I have 1 textbox and 5 button on my page, and it has TabIndex from 1...7 respectively of pressing ENTER outside of a texbox and a button it called Click event of a button who has tabindex 3 and this button is placed on top left side of a page. Is anyone know why is it happened? and How to avoid this.
help is highly appreciated..
Regards,
PPCC
Re: problem while pressing ENTER on a web page.
Hey,
What do you want to happen when you hit enter? Anything, or nothing?
An ASP.Net Form has the concept of a DefaultButton, which is the button that is called when the enter button is pressed. What is this property set to for your web application?
Gary
Re: problem while pressing ENTER on a web page.
Quote:
help is highly appreciated..
your feedback highly appreciated..
Re: problem while pressing ENTER on a web page.
Hey PPCC,
Did this work for you? If not, can you describe exactly what you are trying to achieve, and I am sure we will be able to help you.
Gary
Re: problem while pressing ENTER on a web page.
I have done like tis
<body onkeypress="window.event.keyCode = 0;" />
it worked.
Big TX
Re: problem while pressing ENTER on a web page.
Hey,
I am glad to hear that you got it working, but to me this sounds like a little bit of a hack.
You are essentially preventing the user for actually pressing any buttons, as this will always be overwritten with a 0. Is this actually what you want?
If so, then can you please mark your thread as resolved.
Gary