barcodes and Asp.net reading and writing
Recently, I was working on a web based project, muost part of it was as same as other regular database projects, but there was only  a big difference , I had to use Barcodes!

At fist I had no idea how to use a bar-code scanner in a web based Application! As you know asp.net is a server side technology and barcode reader needed a client side  program , so in the best situation  If I could find how to write a program that interact with barcode scanner still I couldn’t  send the information to browser !

But a good programmer never says: “I can’t !” so I did not give up and I started to search for dotnet  source code that can interact with the barcode reader hopping to solve the big problem latter.

Fortunately some one has same issue and in a second I found myself the happiest programmer on the web ! believe me or not , I was not suppose to write a single line code!  And I was not suppose to be consider abut sending information to the web . every thing was ready ! most of barcode scanners has a program with themselves that simulate   pushing the keys of the  keyboard ! so It could read the barcode and write it straight to a Textbox on the web form and submit the form !

 

“Oh my GOD , are you kidding me ?! I offered such a wage for doing almost nothing ?!” I said , “but wait a minute !I have to generate barcodes too! Damn !” so how do I generate them ?! I started to search again , first of all I understood that there are a lot a barcode standards ! I did not expect to but I found every thing abut barcodes in wikipedia:

http://en.wikipedia.org/wiki/Barcode  

 

“But what kind of barcode do I need!?” It was the fist question cross my mind. I needed a standard that be supported by most scanners and also can make numbers because I needed numbers only .

 

I searched again and I found there is some ready dotnet dlls for sell that generate barcodes but I needed a free one ! and you know , you can find almost every thing free on the net, the key is keep searching !  I found this one useful :

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=8817&lngWId=4

 

It is an ASP 3 App. there are more in “planet-source-code” in ASP and ASP.net  if you are interested. But I felt like search more and I found an article on codeproject  based on “free 3 of  9” fonts ! that was cool! I could simply use a font to draw  a  “CODE 39 “ barcode It is a safe standard and is supported by almost all brands of  barcode scanners ! It’s not the best but It will perform what I expected to ! the problem of this standard is that it can’t  hold an amount of  information (letters ) in a particular space (sticker) . but for only 6 digits it’s ok !you can also use letters for saving more different keys .

If you use only 6 digits you can have 1/000/000 different keys (as IDS) and if you use only English letters and digits you can have 2/176/782/336 unique keys ! isn’t it enough for you ?!

 

Here the fonts website :

http://www.squaregear.net/fonts/free3of9.shtml

was this article usful to you ?
by : Hossein Rooznamechi - on : 4/17/2007 - Visits : 539
result of survey
3 0
[send Your Comment]





[send Your Comment]