Softmatic .NET Barcode Library - ASP .NET SampleThis sample demonstrates the use of the Softmatic .NET Barcode Library in an ASP .NET application.
NOTE: In order for the sample to work, you have to update the reference to Softmatic.Library NET in the References section of the project. Point it to the location of the library on your PC.
The sample displays a simple page, Default.aspx, that contains a control for the data to encode, a drop down box for the codetype, a "Generate" button and an image control.
By entering data and clicking the "Generate" button (or simply by hitting <Enter>) the image control's URL is updated. The URL consists of the page name, Barcode.aspx, and properties for the encoded data and the code type.
The second page, Barcode.aspx, parses the URL parameters (in this sample only the data and codetype are passed) and creates a barcode from the data. The created image is then streamed back to the calling page. If the encoded data is not valid for the selected barcode type (e.g. letters for EAN codes), a null image is returned. The image control will then display the ALT text of the image.
Similarly, the image is update when the user selectes another code type from the drop down list. The control has Auto Post Back set to TRUE so that the barcode is updated right away.
Back to the manual index.