Essential Studio for Asp.Net | Demos

SHOWCASE SAMPLES
Showcase samples
    • Symbology

    • Text to Encode

    <%@ Page Title="Barcode-Getting Started-ASP.NET-SYNCFUSION"   Language="C#" MetaDescription="Essential Studio JS 1 for ASP.NET Barcode" AutoEventWireup="true" MasterPageFile="~/Samplebrowser.Master" CodeBehind="DefaultFunctionalities.aspx.cs" Inherits="WebSampleBrowser.Barcode.DefaultFunctionalities" %>
    
    <asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="ScriptSection">
        <script src="Scripts/ej.web.all.min.js"></script>
    </asp:Content>
    
    <asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="ControlsSection">
        <div class="content-container-fluid">
            <div class="row">
                <div class="cols-sample-area">
                    <ej:barcode id="Barcode1" runat="server" text="//www.syncfusion.com " symbologytype="qrbarcode"/>            
                </div>
    
                <div>
                    <asp:Label runat="server" Font-Bold="true" Font-Size="12px" Text=" * Invalid characters found in entered text"
                        Font-Italic="true" ForeColor="Red" Visible="false" ID="errorNotify"></asp:Label>
                </div>
    
                <div id="sampleProperties">
                    <div class="prop-grid">
                        <asp:Label runat="server" Font-Bold="true" Font-Size="12px" Text=" * Invalid characters found in entered text"
                            Font-Italic="true" ForeColor="Red" Visible="false" ID="Label3"></asp:Label>
                        <ul style="list-style: none">
                            <li>
                                <asp:Label ID="Label4" runat="server" Text="Symbology" Font-Bold="true" Width="150px"></asp:Label>
                            </li>
                            <li></li>
                            <li>
                                <asp:ListBox runat="server" ID="symbolListBx"
                                    AutoPostBack="true" OnSelectedIndexChanged="symbolListBx_SelectionChanged">
                                    <asp:ListItem>Code39</asp:ListItem>
                                    <asp:ListItem>Code39Extended</asp:ListItem>
                                    <asp:ListItem>Code11</asp:ListItem>
                                    <asp:ListItem>Codabar</asp:ListItem>
                                    <asp:ListItem>Code32</asp:ListItem>
                                    <asp:ListItem>Code93</asp:ListItem>
                                    <asp:ListItem>Code93Extended</asp:ListItem>
                                    <asp:ListItem>Code128A</asp:ListItem>
                                    <asp:ListItem>Code128B</asp:ListItem>
                                    <asp:ListItem>Code128C</asp:ListItem>
                                    <asp:ListItem>DataMatrix</asp:ListItem>
                    <asp:ListItem>UpcBarcode</asp:ListItem>
                                    <asp:ListItem Selected="True">QRBarcode</asp:ListItem>
                                </asp:ListBox>
                                <br />
                            </li>
                            <li>
                                <asp:Label ID="Label5" runat="server" Text="Text to Encode" Width="150px" Font-Bold="true"></asp:Label>
                            </li>
                            <li>
                                <asp:TextBox runat="server" Text="//www.syncfusion.com " ID="txtBox"></asp:TextBox>
                                <br />
                            </li>
                            <li>
                                <asp:Button runat="server" Text="Update Barcode" ID="Button1" OnClick="Update_Click" />
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            $("#sampleProperties").ejPropertiesPanel();
        </script>
    </asp:Content>
    
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    
    namespace WebSampleBrowser.Barcode
    {
        public partial class DefaultFunctionalities : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
    
            }
               protected void Update_Click(object sender, EventArgs e)
            {
                string inputText = txtBox.Text;
                CreateBarcode();
                Barcode1.Text = txtBox.Text = inputText;
            }
    
            protected void symbolListBx_SelectionChanged(object sender, EventArgs e)
               {
                   CreateBarcode();
               }
                private void CreateBarcode()
                {
                Barcode1.SymbologyType = (Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType)Enum.Parse(typeof(Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType), symbolListBx.SelectedItem.ToString(), true);
                switch (Barcode1.SymbologyType)
                {
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Codabar:
                        Barcode1.BarHeight = 120;
                        Barcode1.Text = txtBox.Text = "01234567";
                        Barcode1.DisplayText = true;
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Code11:
                     
                        Barcode1.BarHeight = 120;
                       
                        Barcode1.Text = txtBox.Text = "01234567";
                        Barcode1.DisplayText = true;
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Code32:
                       
                        Barcode1.BarHeight = 120;
                        
                        Barcode1.Text = txtBox.Text = "01234567";
                        Barcode1.DisplayText = true;
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Code128C:
                       
                        Barcode1.BarHeight = 120;
                       
                        Barcode1.Text= txtBox.Text = "01234567";
                        Barcode1.DisplayText = true;
                        break;
    
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.QRBarcode:
                        {
                           
                            Barcode1.Text = txtBox.Text = @"//www.syncfusion.com ";
                            Barcode1.DisplayText = false;
                        }
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.DataMatrix:
                        {    
                        
                            Barcode1.XDimension = 8;
                            Barcode1.Text = txtBox.Text = "SYNCFUSION";
                            Barcode1.DisplayText = false;
                        }
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Code128B:
                        Barcode1.BarHeight = 120;
                        Barcode1.Text = txtBox.Text = "SYNCFUSION";
                        Barcode1.DisplayText = true;
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Code128A:
                        Barcode1.BarHeight = 120;
                        Barcode1.Text = txtBox.Text = "SYNCFUSION";
                        Barcode1.DisplayText = true;
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Code39:
                        Barcode1.BarHeight = 120;
                        Barcode1.Text = txtBox.Text = "SYNCFUSION";
                        Barcode1.DisplayText = true;
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Code39Extended:
    
                        Barcode1.BarHeight = 120;
    
                        Barcode1.Text = txtBox.Text = "SYNCFUSION";
                        Barcode1.DisplayText = true;
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Code93:
                     
                        Barcode1.BarHeight = 120;
                      
                        Barcode1.Text = txtBox.Text = "SYNCFUSION";
                        Barcode1.DisplayText = true;
                        break;
                    case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.Code93Extended:
                        Barcode1.BarHeight = 120;
                        Barcode1.Text = txtBox.Text = "SYNCFUSION";
                        Barcode1.DisplayText = true;
                        break;
             case Syncfusion.JavaScript.DataVisualization.BarcodeSymbolType.UpcBarcode:
                        Barcode1.BarHeight = 120;
                        Barcode1.Text = txtBox.Text = "01234567890";
                        Barcode1.DisplayText = true;
                        break;
                    default:
                        Barcode1.Text = txtBox.Text = "";
                        break;
                }
            }
        }
    }