In Visual Studio Solution Explorer Window, right click menu
References. Select menu
Add Reference....
In the
Reference Manager windows, click button
Browse... to add KeepAutomation ASP.NET Barcode Generator dll.
Navigate to the downloaded package
/DLL/Net40/, choose file
KeepAutomation.Barcode.Web.dll
Click button
OK
Now you can find the ASP.NET Barcode Generator dll added successfully in your ASP.NET application project references.
Open
Toolbox in Visual Studio, right click Tab
Standard. Choose menu "Choose Items..."
In the opened
Choose Toolbox Items window, click button
Browse...
Navigate to the downloaded package
/DLL/Net40/, choose file
KeepAutomation.Barcode.Web.dll again.
You can find the selected barcode generator dll is ready to be loaded. Click button
OK.
Now you can find the Barcode Generator web control item under the tab "Standard" in the "Toolbox.
And the KeepAutomation ASP.NET Barcode Generator web control has been installed to Visual Studio successfully.
In the ASP.NET web forms project, add a new item "Web Form" to the project, named
barcode.aspx
Replace the
barcode.aspx content with the following C# source code.
<%@ Page Language="C#" %>
<%@ Import Namespace="KeepAutomation.Barcode.Web" %>
<%
BarCodeStream.generateBarcode(Request, Response);
%>
Replace the
barcode.aspx.cs content with the following C# source code.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class barcode : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
In Visual Studio project, click the web file
Default.aspx. Open the web file in
Design view mode
Drag and drop the installed
BarCodeControl from "Toolbox" to the place where to genarate the barcode in the web page "Default.aspx"
Run the ASP.NET web forms application in Visual Studio. In the opened web browser, a sample Code 128 barcode is displayed in the web
page "Default.aspx". You can customize the barcode properties in the control
Properties or in the Default.aspx.cs C# source codes.
Select the barcode control on the Default.aspx web page, on the right
Properties window, change property
X to 2.
Run the web application, you can find the generated Code 128 barcode has been updated.
You can also customize and update barcode from the C# source code.
In
Default.aspx.cx, add the following C# source code to update the encoding barcode data.
BarCodeControl1.CodeToEncode = "ABC-123";