Barcode
General
This view shows basic features of Barcode for ASP.NET MVC.
Features
Barcode control | Result |
---|---|
|
Codabar
The Codabar control is used to display Codabar barcodes.
Value: A15126893B
Code39
The Code39 control is used to display Code39 barcodes.
Value: A1312BCV
Code128
The Code128 control is used to display Code128 barcodes.
Value: Code128Demo
Ean8
The Ean8 control is used to display EAN-8 barcodes.
Value: 9031101
Ean13
The Ean13 control is used to display EAN-13 barcodes.
Value: 963850741111
Gs1_128
The Gs1_128 control is used to display GS1-128 barcodes.
Value: GS1128Demo
QRCode
The QrCode control is used to display QR code barcodes.
Value: https://en.wikipedia.org/wiki/QR_code
UpcA
The UpcA control is used to display UPC-A barcodes.
Value: 01234567890
UpcE0
The UpcE0 control is used to display UPC-E0 barcodes.
Value: 012345
UpcE1
The UpcE1 control is used to display UPC-E1 barcodes.
Value: 012345
Code49
The Code49 control is used to display Code49 barcodes.
Value: Code49_123
Code93
The Code93 control is used to display Code93 barcodes.
Value: CODE93
DataMatrixEcc200
The DataMatrixEcc200 control is used to display DataMatrix ECC-200 barcodes.
Value: abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%^&*()_+
DataMatrixEcc000
The DataMatrix control is used to display DataMatrix barcodes with specification versions in the range from ECC 000 to ECC 140.
Value: abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%^&*()_+
Interleaved2of5
The Interleaved2of5 control is used to display Interleaved 2 of 5 barcodes.
Value: 1234567895
Itf14
The Itf14 control is used to display ITF-14 barcodes.
Value: 98765432109213
JapanesePostal
The JapanesePostal control is used to display Japanese Postal barcodes.
Value: 6540123789-A-K-Z
Gs1DataBarExpanded
The Gs1DataBarExpanded control is used to display GS1 DataBar Expanded barcodes.
Value: (01)00012345678905(10)ABC123
Gs1DataBarExpandedStacked
The Gs1DataBarExpandedStacked control is used to display GS1 DataBar Expanded Stacked barcodes.
Value: (01)00012345678905(10)ABC123
Gs1DataBarLimited
The Gs1DataBarLimited control is used to display GS1 DataBar Limited barcodes.
Value: (01)20012345678909
Gs1DataBarOmnidirectional
The Gs1DataBarOmnidirectional control is used to display GS1 DataBar Omnidirectional barcodes.
Value: (01)20012345678909
Gs1DataBarStacked
The Gs1DataBarStacked control is used to display GS1 DataBar Stacked barcodes.
Value: (01)20012345678909
Gs1DataBarStackedOmnidirectional
The Gs1DataBarStackedOmnidirectional control is used to display GS1 DataBar StackedOmnidirectional barcodes.
Value: (01)20012345678909
Gs1DataBarTruncated
The Gs1DataBarTruncated control is used to display GS1 DataBar Truncated barcodes.
Value: (01)20012345678909
Pdf417
The Pdf417 control is used to display PDF417 barcodes.
Value: This is a PDF417 barcode
MicroPdf417
The MicroPdf417 control is used to display MicroPDF417 barcodes.
Value: This is a MicroPDF417 barcode
|
Description
The Codabar control is used to display Codabar barcodes.
The Code39 control is used to display Code39 barcodes.
The Code49 control is used to display Code49 barcodes.
The Code93 control is used to display Code93 barcodes.
The Code128 control is used to display Code128 barcodes.
The DataMatrixEcc200 control is used to display DataMatrix ECC-200 barcodes.
The DataMatrix control is used to display DataMatrix barcodes with specification versions in the range from ECC 000 to ECC 140.
The Ean8 control is used to display EAN-8 barcodes.
The Ean13 control is used to display EAN-13 barcodes.
The Gs1_128 control is used to display GS1-128 barcodes.
The Gs1DataBarExpanded control is used to display GS1 DataBar Expanded barcodes.
The Gs1DataBarExpandedStacked control is used to display GS1 DataBar Expanded Stacked barcodes.
The Gs1DataBarLimited control is used to display GS1 DataBar Limited barcodes.
The Gs1DataBarOmnidirectional control is used to display GS1 DataBar Omnidirectional barcodes.
The Gs1DataBarStacked control is used to display GS1 DataBar Stacked barcodes.
The Gs1DataBarStackedOmnidirectional control is used to display GS1 DataBar StackedOmnidirectional barcodes.
The Gs1DataBarTruncated control is used to display GS1 DataBar Truncated barcodes.
The Interleaved2of5 control is used to display Interleaved 2 of 5 barcodes.
The Itf14 control is used to display ITF-14 barcodes.
The JapanesePostal control is used to display Japanese Postal barcodes.
The Pdf417 control is used to display PDF417 barcodes.
The MicroPdf417 control is used to display MicroPDF417 barcodes.
The QrCode control is used to display QR code barcodes.
The UpcA control is used to display UPC-A barcodes.
The UpcE0 control is used to display UPC-E0 barcodes.
The UpcE1 control is used to display UPC-E1 barcodes.
using C1.Web.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace MvcExplorer.Controllers { public partial class BarcodeController : Controller { // GET: Index public ActionResult Index() { return View(getBarcodeControls()); } private object[] getBarcodeControls() { return new object[] { new { Name = "Codabar" }, new { Name = "Code39" }, new { Name = "Code49" }, new { Name = "Code93" }, new { Name = "Code128" }, new { Name = "DataMatrix", Items = new object[] { new { Name = "DataMatrixEcc200" }, new { Name = "DataMatrixEcc000" } } }, new { Name = "EAN", Items = new object[] { new { Name = "Ean8" }, new { Name = "Ean13" } } }, new{ Name = "Gs1_128" }, new { Name = "Gs1DataBar", Items = new object[] { new { Name = "Gs1DataBarExpanded" }, new { Name = "Gs1DataBarExpandedStacked" }, new { Name = "Gs1DataBarLimited" }, new { Name = "Gs1DataBarOmnidirectional" }, new { Name = "Gs1DataBarStacked" }, new { Name = "Gs1DataBarStackedOmnidirectional" }, new { Name = "Gs1DataBarTruncated" } } }, new { Name = "Interleaved2of5" }, new { Name = "Itf14" }, new { Name = "JapanesePostal" }, new { Name = "PDF", Items = new object[] { new { Name = "Pdf417" }, new { Name = "MicroPdf417" } } }, new { Name = "QRCode" }, new { Name = "UPC", Items = new object[] { new { Name = "UpcA" }, new { Name = "UpcE0" }, new { Name = "UpcE1" } } } }; } } }
@model object[] <link href="~/Content/css/barcode.css" rel="stylesheet" /> <table class="table"> <thead> <tr> <th>@Html.Raw(Resources.Barcode.Barcode_Index_Text0)</th> <th>@Html.Raw(Resources.Barcode.Barcode_Index_Text2)</th> </tr> </thead> <tbody> <tr> <td style="width: 400px"> @(Html.C1().TreeView().Id("treeView") .Bind(Model) .OnClientSelectedItemChanged("OnSelectedItemChanged") .OnClientLoadedItems("OnLoadedItems") .DisplayMemberPath("Name") .ChildItemsPath("Items") .IsAnimated(true) .AutoCollapse(true) .CssStyle("overflow", "hidden") .ExpandOnClick(true)) </td> <td style="position: relative"> <div id="Codabar" class="barcode-control-result"> <div class="name">Codabar</div> <div class="description">@Html.Raw(Resources.Barcode.Codabar_Description_Text0)</div> <div class="barcode">@Html.C1().Codabar().Value("A15126893B").AutoWidthZoom(2)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>A15126893B</div> </div> <div id="Code39" class="barcode-control-result"> <div class="name">Code39</div> <div class="description">@Html.Raw(Resources.Barcode.Code39_Description_Text0)</div> <div class="barcode">@Html.C1().Code39().Value("A1312BCV").AutoWidthZoom(2)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>A1312BCV</div> </div> <div id="Code128" class="barcode-control-result"> <div class="name">Code128</div> <div class="description">@Html.Raw(Resources.Barcode.Code128_Description_Text0)</div> <div class="barcode">@Html.C1().Code128().Value("Code128Demo").AutoWidthZoom(2).CodeSet(Code128CodeSet.B)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>Code128Demo</div> </div> <div id="Ean8" class="barcode-control-result"> <div class="name">Ean8</div> <div class="description">@Html.Raw(Resources.Barcode.Ean8_Description_Text0)</div> <div class="barcode">@Html.C1().Ean8().Value("9031101")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>9031101</div> </div> <div id="Ean13" class="barcode-control-result"> <div class="name">Ean13</div> <div class="description">@Html.Raw(Resources.Barcode.Ean13_Description_Text0)</div> <div class="barcode">@Html.C1().Ean13().Value("963850741111").AddOn("86")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>963850741111</div> </div> <div id="Gs1_128" class="barcode-control-result"> <div class="name">Gs1_128</div> <div class="description">@Html.Raw(Resources.Barcode.Gs1_128_Description_Text0)</div> <div class="barcode">@Html.C1().Gs1_128().Value("GS1128Demo").AutoWidthZoom(2)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>GS1128Demo</div> </div> <div id="QRCode" class="barcode-control-result"> <div class="name">QRCode</div> <div class="description">@Html.Raw(Resources.Barcode.QRCode_Description_Text0)</div> <div class="barcode">@Html.C1().QrCode().Value("https://en.wikipedia.org/wiki/QR_code")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>https://en.wikipedia.org/wiki/QR_code</div> </div> <div id="UpcA" class="barcode-control-result"> <div class="name">UpcA</div> <div class="description">@Html.Raw(Resources.Barcode.UpcA_Description_Text0)</div> <div class="barcode">@Html.C1().UpcA().Value("01234567890")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>01234567890</div> </div> <div id="UpcE0" class="barcode-control-result"> <div class="name">UpcE0</div> <div class="description">@Html.Raw(Resources.Barcode.UpcE0_Description_Text0)</div> <div class="barcode">@Html.C1().UpcE0().Value("012345")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>012345</div> </div> <div id="UpcE1" class="barcode-control-result"> <div class="name">UpcE1</div> <div class="description">@Html.Raw(Resources.Barcode.UpcE1_Description_Text0)</div> <div class="barcode">@Html.C1().UpcE1().Value("012345")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>012345</div> </div> <div id="Code49" class="barcode-control-result"> <div class="name">Code49</div> <div class="description">@Html.Raw(Resources.Barcode.Code49_Description_Text0)</div> <div class="barcode">@Html.C1().Code49().Value("Code49_123")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>Code49_123</div> </div> <div id="Code93" class="barcode-control-result"> <div class="name">Code93</div> <div class="description">@Html.Raw(Resources.Barcode.Code93_Description_Text0)</div> <div class="barcode">@Html.C1().Code93().Value("CODE93").CheckDigit(true).AutoWidthZoom(2)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>CODE93</div> </div> <div id="DataMatrixEcc200" class="barcode-control-result"> <div class="name">DataMatrixEcc200</div> <div class="description">@Html.Raw(Resources.Barcode.DataMatrixEcc200_Description_Text0)</div> <div class="barcode">@Html.C1().DataMatrixEcc200().Value("abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%^&*()_+")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%^&*()_+</div> </div> <div id="DataMatrixEcc000" class="barcode-control-result"> <div class="name">DataMatrixEcc000</div> <div class="description">@Html.Raw(Resources.Barcode.DataMatrixEcc000_Description_Text0)</div> <div class="barcode">@Html.C1().DataMatrixEcc000().Value("abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%^&*()_+").Version(DataMatrixVersion.Ecc100)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%^&*()_+</div> </div> <div id="Interleaved2of5" class="barcode-control-result"> <div class="name">Interleaved2of5</div> <div class="description">@Html.Raw(Resources.Barcode.Interleaved2of5_Description_Text0)</div> <div class="barcode">@Html.C1().Interleaved2of5().Value("1234567895").AutoWidthZoom(2)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>1234567895</div> </div> <div id="Itf14" class="barcode-control-result"> <div class="name">Itf14</div> <div class="description">@Html.Raw(Resources.Barcode.Itf14_Description_Text0)</div> <div class="barcode">@Html.C1().Itf14().Value("98765432109213")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>98765432109213</div> </div> <div id="JapanesePostal" class="barcode-control-result"> <div class="name">JapanesePostal</div> <div class="description">@Html.Raw(Resources.Barcode.JapanesePostal_Description_Text0)</div> <div class="barcode">@Html.C1().JapanesePostal().Value("6540123789-A-K-Z")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>6540123789-A-K-Z</div> </div> <div id="Gs1DataBarExpanded" class="barcode-control-result"> <div class="name">Gs1DataBarExpanded</div> <div class="description">@Html.Raw(Resources.Barcode.Gs1DataBarExpanded_Description_Text0)</div> <div class="barcode">@Html.C1().Gs1DataBarExpanded().Value("(01)00012345678905(10)ABC123").AutoWidthZoom(2)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>(01)00012345678905(10)ABC123</div> </div> <div id="Gs1DataBarExpandedStacked" class="barcode-control-result"> <div class="name">Gs1DataBarExpandedStacked</div> <div class="description">@Html.Raw(Resources.Barcode.Gs1DataBarExpandedStacked_Description_Text0)</div> <div class="barcode">@Html.C1().Gs1DataBarExpandedStacked().Value("(01)00012345678905(10)ABC123").AutoWidthZoom(2)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>(01)00012345678905(10)ABC123</div> </div> <div id="Gs1DataBarLimited" class="barcode-control-result"> <div class="name">Gs1DataBarLimited</div> <div class="description">@Html.Raw(Resources.Barcode.Gs1DataBarLimited_Description_Text0)</div> <div class="barcode">@Html.C1().Gs1DataBarLimited().Value("(01)20012345678909")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>(01)20012345678909</div> </div> <div id="Gs1DataBarOmnidirectional" class="barcode-control-result"> <div class="name">Gs1DataBarOmnidirectional</div> <div class="description">@Html.Raw(Resources.Barcode.Gs1DataBarOmnidirectional_Description_Text0)</div> <div class="barcode">@Html.C1().Gs1DataBarOmnidirectional().Value("(01)20012345678909")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>(01)20012345678909</div> </div> <div id="Gs1DataBarStacked" class="barcode-control-result"> <div class="name">Gs1DataBarStacked</div> <div class="description">@Html.Raw(Resources.Barcode.Gs1DataBarStacked_Description_Text0)</div> <div class="barcode">@Html.C1().Gs1DataBarStacked().Value("(01)20012345678909")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>(01)20012345678909</div> </div> <div id="Gs1DataBarStackedOmnidirectional" class="barcode-control-result"> <div class="name">Gs1DataBarStackedOmnidirectional</div> <div class="description">@Html.Raw(Resources.Barcode.Gs1DataBarStackedOmnidirectional_Description_Text0)</div> <div class="barcode">@Html.C1().Gs1DataBarStackedOmnidirectional().Value("(01)20012345678909")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>(01)20012345678909</div> </div> <div id="Gs1DataBarTruncated" class="barcode-control-result"> <div class="name">Gs1DataBarTruncated</div> <div class="description">@Html.Raw(Resources.Barcode.Gs1DataBarTruncated_Description_Text0)</div> <div class="barcode">@Html.C1().Gs1DataBarTruncated().Value("(01)20012345678909")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>(01)20012345678909</div> </div> <div id="Pdf417" class="barcode-control-result"> <div class="name">Pdf417</div> <div class="description">@Html.Raw(Resources.Barcode.Pdf417_Description_Text0)</div> <div class="barcode">@Html.C1().Pdf417().Value("This is a PDF417 barcode").AutoWidthZoom(2)</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>This is a PDF417 barcode</div> </div> <div id="MicroPdf417" class="barcode-control-result"> <div class="name">MicroPdf417</div> <div class="description">@Html.Raw(Resources.Barcode.MicroPdf417_Description_Text0)</div> <div class="barcode">@Html.C1().MicroPdf417().Value("This is a MicroPDF417 barcode")</div> <div><span class="value">@Html.Raw(Resources.Barcode.Barcode_Index_Text1): </span>This is a MicroPDF417 barcode</div> </div> </td> </tr> </tbody> </table> @section Scripts{ <script> function OnSelectedItemChanged(e, s) { var selectedItem = e.selectedItem; if (!selectedItem.Items) { $(".barcode-control-result").css("opacity", 0); $("#" + selectedItem.Name).css("opacity", 1); } } function OnLoadedItems(e) { e.getFirstNode().select(); } </script> } @section Summary{ <p>@Html.Raw(Resources.Barcode.Barcode_Description_Text0)</p> } @section Description{ @Html.Raw(Resources.Barcode.Barcode_Description_Text0) <p> @Html.Raw(Resources.Barcode.Codabar_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Code39_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Code49_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Code93_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Code128_Description_Text0)<br /> @Html.Raw(Resources.Barcode.DataMatrixEcc200_Description_Text0)<br /> @Html.Raw(Resources.Barcode.DataMatrixEcc000_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Ean8_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Ean13_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Gs1_128_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Gs1DataBarExpanded_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Gs1DataBarExpandedStacked_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Gs1DataBarLimited_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Gs1DataBarOmnidirectional_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Gs1DataBarStacked_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Gs1DataBarStackedOmnidirectional_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Gs1DataBarTruncated_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Interleaved2of5_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Itf14_Description_Text0)<br /> @Html.Raw(Resources.Barcode.JapanesePostal_Description_Text0)<br /> @Html.Raw(Resources.Barcode.Pdf417_Description_Text0)<br /> @Html.Raw(Resources.Barcode.MicroPdf417_Description_Text0)<br /> @Html.Raw(Resources.Barcode.QRCode_Description_Text0)<br /> @Html.Raw(Resources.Barcode.UpcA_Description_Text0)<br /> @Html.Raw(Resources.Barcode.UpcE0_Description_Text0)<br /> @Html.Raw(Resources.Barcode.UpcE1_Description_Text0) </p> }