TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
TAN WhoAMI
NA
291
0
Combine button_Click into textBox_TextChanged event
Jun 21 2012 10:12 PM
presently, my implementation is such that:
when after some text is entered in a textbox, then a certain button is pressed, and it executes certain events, like store some data in the database, and also clear the textbox for the next input of text.
I want to minimize the steps involved, such that the same sequence of events happen, and do not want to implement the execution of certain events (store data in database and clear the textbox) inside the button_Click event. That is, when user enters some text (or specificially, when the text is captured from a barcode scanner), it would perform that certain events (store data in database and clear the textbox). It would be automated such that user just need to scan the barcode, without pressing any button. It would save certain data to the database, and next clear the textbox, so that next user can come and scan.
which event of the textbox should I use?
I have tried textBox_SelectionChanged, textBox_TextChanged and textBox_SourceUpdated, to bring those code inside button_Click to textBox_SelectionChanged, textBox_TextChanged and textBox_SourceUpdated, but none seem to work. The problem is that I need to clear the textbox after each scan, and that result in no barcode being displayed.
Any good suggestions is greatly appreciated.
Reply
Answers (
0
)
Search Algorithm Required
How to use get/set in C#