A barcode reader component can achieve this! take a look at this barcode reader control for web apps.