|
|
After installation this class reference, C#, VB, C++, VBS, ASP samples
For frequently asked questions (FAQ) visit: www.lesnikowski.com/barcode/faq.aspx For ordering info please visit: www.lesnikowski.com/barcode/buy.aspx |
using Lesnikowski.Barcode; using System.Drawing.Imaging; //... BaseBarcode barcode = BarcodeFactory.GetBarcode(Symbology.EAN13); barcode.Number = "123456789012"; barcode.ChecksumAdd = true; // Render barcode: this.pictureBox1.Image = barcode.Render(); // You can also save it to file: barcode.Save("c:\\barcode.gif", ImageFormat.Gif);
Register an HTTP handler for IIS 6.0:
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="Barcode.axd"
type="Lesnikowski.Web.BarcodeHttpHandler" />
</httpHandlers>
</system.web>
</configuration>
Register an HTTP handler for IIS 7.0 running in Integrated Mode:
<configuration>
<system.webServer>
<handlers>
<add name="BarcodeHttpHandler" verb="*"
path="Barcode.axd"
type="Lesnikowski.Web.BarcodeHttpHandler, Barcode"
resourceType="Unspecified" />
</handlers>
</system.webServer>
</configuration>
Register an HTTP handler for IIS 7.0 running in Classic mode:
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="Barcode.axd" type="Lesnikowski.Web.BarcodeHttpHandler, Barcode" />
</httpHandlers>
</system.web>
<system.webServer>
<add name=BarcodeHttpHandler" verb="*"
path="Barcode.axd"
Modules="IsapiModule"
scriptProcessor="FrameworkPath\aspnet_isapi.dll"
resourceType="File" />
</system.webServer>
</configuration>
...remember to replace FrameworkPath with the correct path to the Aspnet_isapi.dll file.
If you are using VS2003 use the following:
<httpHandlers>
<add
verb="*"
path="Barcode.axd"
type="Lesnikowski.Web.BarcodeHttpHandler, Barcode" />
</httpHandlers>