The following sample demonstrates how to use BarcodeWebImage1 control from Bytescout.BarCode SDK in ASP.NET application. BarcodeWebImage control is able to display barcodes in your ASP.NET application without temporary files required. Just add BarcodeWebImage control into Design mode in your ASP.NET application and set its properties and barcode will be displayed automatically
Barcode web control allows to generate/draw/save barcodes at server and serve it as an image without temporary files required.
See BarcodeWebImage control online help documentation for the detailed instruction
ASP.NET (Visual Basic code)
<%@ Page Language=”vb” AutoEventWireup=”false” CodeBehind=”Default.aspx.vb” Inherits=”VBWebImageTester._Default” %>
<%@ Register Assembly=”Bytescout.BarCode” Namespace=”Bytescout.BarCode” TagPrefix=”cc1″ %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” >
<head runat=”server”>
<title>Untitled Page</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<cc1:barcodewebimage id=”BarcodeWebImage1″ runat=”server” symbology=”Code39″ value=”5712349″></cc1:barcodewebimage>
</div>
</form>
</body>
</html>
ASP.NET (C# code)
<%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”Default.aspx.cs” Inherits=”BarcodeWebImageTester._Default” %>
<%@ Register Assembly=”Bytescout.BarCode” Namespace=”Bytescout.BarCode” TagPrefix=”cc1″ %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” >
<head runat=”server”>
<title>BarcodeWebImage test page</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<cc1:barcodewebimage id=”BarcodeWebImage1″ runat=”server” RenderingHint=”SystemDefault” SmoothingMode=”Default” Value=”DATA” ForeColor=”Black” HorizontalAlignment=”Right” Angle=”Degrees0″ CaptionPosition=”Below” NarrowBarWidth=”3″ VerticalAlignment=”Top” AddChecksum=”False” AddChecksumToCaption=”False” AdditionalCaptionPosition=”Above” AdditionalCaptionFont=”Arial, 13pt” BackColor=”White” BarHeight=”50″ CaptionFont=”Arial, 13pt” DrawCaption=”True” WideToNarrowRatio=”3″ Symbology=”Code128″ AdditionalCaption=” “></cc1:barcodewebimage>
</div>
</form>
</body>
</html>