I have a problem that I'm stumped as to how to trouble shoot.
I have a "scan.aspx" page with a dropdownlist that's populated at page load with a list of student ID's. The focus is also set to this object on page load. On selectedindexchange, I'm firing code that inserts a record into a history table.
When someone scans a student ID card, it's dumping the text into the dropdownlist. There are some odd things happening though and I'm not sure why.
Here's the test:
The dropdownlist (selectedvalue) has the following values (studentUID): "2 2260 913381992", "2397", "A0000011249", "stu00001", "stu00002", "stu00003", "stu00004" (sorted in that order - asc).
The selecteditem is set to the student's actual table ID (studentID). I'm assuming though, that when a card is scanned, it's using the value of the dropdownlist, not the item.
When the card with "2397" is scanned, it works the say it should.
When I scan the card with the "A0000011249", it's selecting that value in the list, running the selectedindexchanged function, then also selecting the "2397" value and running the selectedindexchanged fucntion again.
Also, if the card with "2 2260 913381992" is scanned, it's selecting that value, then also selecting the "2397" value again.
Can anyone help? Is there a better way to do this? I thought about switching out the dropdownlist with a text field, but then I'm not sure how to fire a function automatically when a card is scanned. The textchanged event is only fired when focus is lost, and during this process, the focus stays on this field.
KizMar
------------
I have a "scan.aspx" page with a dropdownlist that's populated at page load with a list of student ID's. The focus is also set to this object on page load. On selectedindexchange, I'm firing code that inserts a record into a history table.
When someone scans a student ID card, it's dumping the text into the dropdownlist. There are some odd things happening though and I'm not sure why.
Here's the test:
The dropdownlist (selectedvalue) has the following values (studentUID): "2 2260 913381992", "2397", "A0000011249", "stu00001", "stu00002", "stu00003", "stu00004" (sorted in that order - asc).
The selecteditem is set to the student's actual table ID (studentID). I'm assuming though, that when a card is scanned, it's using the value of the dropdownlist, not the item.
When the card with "2397" is scanned, it works the say it should.
When I scan the card with the "A0000011249", it's selecting that value in the list, running the selectedindexchanged function, then also selecting the "2397" value and running the selectedindexchanged fucntion again.
Also, if the card with "2 2260 913381992" is scanned, it's selecting that value, then also selecting the "2397" value again.
Can anyone help? Is there a better way to do this? I thought about switching out the dropdownlist with a text field, but then I'm not sure how to fire a function automatically when a card is scanned. The textchanged event is only fired when focus is lost, and during this process, the focus stays on this field.
KizMar
------------