Quantcast
Viewing all articles
Browse latest Browse all 5678

TextBox onTextChanged event & Form Submission

I have a Textbox that the users enter an Employee ID into.
The TextBox has an onTextChanges event that looks up the employee details and displays the employee name in a Label.

The problem that I am having is that if the user enters the EmployeeID without tabbing out of the TextBox and clicks on the Form Submit button, then the TextBox onTextChanged event fires, but the Form Submit button event doesn't fire. The user needs to click on the submit button again to get it to fire.

So effectively, clicking on submit is having the same effect as if user has tabbed out of textbox or clicked on any other control on the page (I think that basically the onTextChanged event is firing when the TextBox loses focus)

Whilst I understand that this is the expected event handling, is there any way to get around this (preferably without using javascript or jquery)?

BTW - the "GetEmployeNameFromID" method is used for multiple TextBoxes on the form.


Viewing all articles
Browse latest Browse all 5678

Trending Articles