In this mode, users can encode and print barcode on web page by two ways: in Visual Studio ASP.NET Web Site or in IIS web application. Before starting, both of the two way need download pqScan Barcode Creator SDK first.
Encoding barcode use ASP.NET Barcode Creator Web Control in Visual Studio
To use the pqScan Barcode Creator WebForms control, follow these steps:
- Unzip the downloaded Trial package to development computer.
- Add Barcode Creator Webforms Control to the Visual studio Toolbox.
- In the ASP.NET Web application, open a Web Form in design mode.
- Select View - Toolbox to display the Toolbox
- Right click on the General pane and select Choose Items...
- In the dialog box Choose Toolbox Items, ensure the .NET Framework Components tab is displayed.
- Push the Browse button and navigate to the "PQScan.BarcodeCreator.dll" file.
- Ensure the checkbox of pqScan Barcode Creator Webforms Control "BarcodeWebControl" is checked.
- With a project's web form open in design mode, drag the Barcode Creator control item from toolbox onto the web form.
- Copy "BarcodeWebHandler.ashx" file in to your ASP.NET web site.
Encoding barcode use ASP.NET Barcode Creator Web Control in IIS
- Unzip the downloaded Trial package to development computer.
- Publish you APS.NET web site to your IIS.
- Copy bin folder to your IIS.
- Copy "BarcodeWebHandler.ashx" file to your IIS root path.
- Create an empty html, and add an image with code <img src="http://localhost:port/BarcodeWebHandler.ashx?BarType=Code128&Data=123456789&Width=300&Height=100"/>
- Viewing html page on web browser, you will see the barcode made on the page.
Note: When you use pqScan Barcode Creator Web Control to generate barcodes, please ensure the "BarcodeWebHandler.ashx" file is copied to the folder where the web pages are generating barcodes in both ways above.
Note: Creating a barcode image both in Visual Studio web site and in IIS, the src property of <img> tag can be changed by javascript to customize barcode image, and there is no need to refresh whole web page.