| TALtech Home: Support: ActiveX Control KB: |
Using the TALtech Bar Code ActiveX Plus with Active Server PagesSystem Requirements
DiscussionThis example is designed to demonstrate how to generate server side bar codes using the TALtech Bar Code ActiveX control (Plus version). It uses an ASP generated HTML form to collect information from the client about the type of bar code they wish to create - including the bar code symbology, the text to be encoded, the text for the comment, etc. When the user completes the form, their information is submitted to the server for processing. The ASP page then reads in the client supplied parameters, generates the bar code and saves it as an image file on the server. It then generates HTML code containing an Image tag which references the newly created bar code image. The generated HTML code is then passed back to the users browser which displays the resulting bar code. How to use this ExampleIt is not impossible that this example will work right "out of the box" with little or no modifications on your part, but don't be surprised if it does not. We have tested it on a Windows 98 machine running Personal Web Server 4.0, a Windows 2000 Server running IIS 5, and a Windows 98 Second Edition machine running Personal Web Server 4.0. However, this example is fairly complicated, there are many elements to it and therefore some of it may not work on your server. Usually if a line causes the script to fail an error is generated and appears in the Browser window identifying which line caused the problem, but it may still take some time to figure out why it is not working. So instead of taking this example and working backwards to fix the problems you encounter, we recommend you start a new application that uses just the basics and then build upon it, borrowing code and ideas from our example until you have rebuilt the application in such a way that not only does it work on your server, but it also does exactly what you want it to do:
Note: The ASP code in this example is recursive. In other words the page
contains logic so that it appears as a form prompting for information
about the bar code that you want to generate the first time you view it.
After you submit the form, the page will rewrite itself to display the
resulting barcode.
View the Source Code behind Barcode.asp (fully commented). Note: The form contains more features than the supplied ASP Code supports: Only the Message, Comment, Symbology and Image Format properties will be set by the ASP Code. As an exercise to help you understand how the example works you may find it useful to make the other properties on the form function too - this will help you learn to use both the ActiveX Control and ASP. Related LinksIntroduction to Active Server Pages |
||||||||||||||||||||
|
||||||||||||||||||||