473,505 Members | 15,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Keyboard Wedge Barcode Scanner - Capture postback

3 New Member
Hi

I have created a website which has a number of buttons on it which allow users to add items to there basket, they then click on an AJAX watermarked textbox to set focus before using a keyboard wedge scanner to scan there staff ID card, this causes a postback and validates the user - all works perfectly.

My problem is caused if the user attempts to scan their card before clicking on the watermarked textbox. This then forces a postback to the server and will fire one of the button controls at random (I presume it fires a control which it thinks has got the focus.)

I have tried setting focus to a textbox automatically following a button control being fired this would then ensure that the wrong button is not fire if the user accidentally scans before they set focus of the control. however the cursor only appears in the text box on original page load and not after the control has been updated.

textbox1.focus
updatepanel2.focus

Any body got any suggestions on this???? Is there a way that I can tell how the postback has been fired and therefore being able to trap it? The barcode value is 'pu00000343'

Thanks

Tom
Apr 9 '08 #1
2 3427
acoder
16,027 Recognized Expert Moderator MVP
Can you post some code so we can have an idea of how you call functions, focus, etc.

If you can add a check when using the scanner that the textbox has focus, that should solve the problem.
Apr 10 '08 #2
tomwilliams
3 New Member
Thanks,

Difficult to post code as its got 3 seperate user controls.

The first usercontrol is the button usercontrol, this creates image buttons using a datalist.

The user clicks one of these buttons and the onclick event raises an event to the page which inturn is posted back to the second usercontrol which has a tree view showing the different items the user has ordered.

The third control is the control I use for setting the focus for the scanner control this has a normal textbox linked to a textboxwatermarked extender, when the user is ready to scan there card they clich the text box which sets focus scan the card and this then processes the order. - Perfect.

The problem is when they scan and havent clicked the text box, the focus appears to be anywhere on the screen and the button in usercontrol one is beign fired.

I have tried

Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
Me.TextBox1.Focus()
Me.TextBox1.Text = "a"

Me.UpdatePanel1.Update()

End Sub

Which is in the main page, (it is putting the letter in for testing, ) however the cursor is not remaining in this control???

Hope this helps, if not I am back in the office tomorrow and I will knock up a test page which I will be able to post.

thanks

Tom
Apr 10 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
10599
by: Don Riesbeck Jr. | last post by:
I'm working on an application (OEM) using C# that utilizes input from a keyboard, and USB Barcode Scanner. The scanner is a HID Keyboard device, and input from it is sent to the system as if it...
1
6166
by: Darren Coleman | last post by:
I need help with 2 keyboard/input questions 1. How do i caputre all keypress events for my application/form? 2. How do I determine which keyboard sent the keypress? What i'm doing is using a...
4
4503
by: teddysnips | last post by:
I posted yesterday about a project I'm involved in to build a login application using a barcode scanner. I've solved most of the problems, but one remains. The client want to disable keyboard...
2
4051
by: Dan | last post by:
I have an application that uses a COM port barcode scanner. This uses a listener to notify the application when a barcode has been scanned. The application now needs to be modified to use a Human...
2
2371
by: Frank Rizzo | last post by:
I have a barcode scanner that hooks up to a keyboard port. I've figured out how to setup a system-wide keyboard hook. However, how do I distinguish regular keyboard input from the barcode scanner...
1
6793
by: Louis Cypher | last post by:
I'm working on an application (OEM) using c# that uses input from a keyboard and a USB Barcode Scanner. I need to be able to identify keystrokes from the barcode scanner and remove them from the...
1
11175
by: Louis Cypher | last post by:
I'm working on an application (OEM) using c# that uses input from a keyboard and a USB Barcode Scanner. I need to be able to identify keystrokes from the barcode scanner and remove them from the...
7
8280
by: Alper Ozgur | last post by:
Hi; How can i capture and decode the barcode that reading by an usb Barcode reader?
2
4778
by: pesobol | last post by:
I am using a wedge barcode scanner to enter data in an access database, but for certain combinations of characters I want to parse the input in code and react accordingly. The keypress event on...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4701
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.