When I enter a value in the combo box and press the Enter-Key, the onTextChanged Event does not executed, instead it calls the Click Event of the first Button at the top the asp.net page.

When I enter a value in the combo box and press the Enter-Key, the onTextChanged Event does not executed, instead it calls the Click Event of the first Button at the top the asp.net page.
musclejackAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ampapaCommented:
So, what is your question?
0
AlexFMCommented:
onTextChanged event is called for each symbol typed in the text box. When you press Enter text is not changed, and event is not called.
0
p_sieCommented:
What about the KeyUp event with keycode 13?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

musclejackAuthor Commented:
It seems like when I hit the enter key, it will loop through and call all the functions in the page, and my question is after enter some text in the combo box, how can I call the onTextChangedEvent only when I press enter and not all the functions/events in the page
0
AlexFMCommented:
Your question shows that you don't need onTextChangedEvent at all. You don't want to validate text every time user presses a key. So, validate text in other place, for example, when user presses Submit button, or when textbox looses input focus.
0
AlexFMCommented:
Or you can call the same function both from onTextChangedEvent and from any other place.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.