ComponentOne QRCode for ASP.NET Web Forms
In This Topic
    Quick Start: Add and Generate QRCode
    In This Topic

    This topic describes how to use C1QRCode control in an ASP.NET application and configure it.

    Step 1 of 2: Create an Application

    Complete the following steps to create an ASP.Net application and add a QRCode control to your Web Form.

    1. In Visual Studio, create a new ASP.Net Web Application and add a new Web Form.
    2. Locate the C1QRCode control in the toolbox and place it onto the Web Form.
      If you cannot locate the control in the toolbox, right click and select Choose items. The Choose Toolbox Items dialog appears. Locate the control and click OK.

    Step 2 of 2: Generate the QRCode

    Complete the following steps to generate the QRCode:

    In the Designer

    1. Click the Smart Tag. The C1QRCode Tasks Menu appears.
    2. Add the text that you want to encode into the QRCode to the Text property.
    3. Run the application. The QRCode will be generated.

    In Source View

    Set the Text property within the <cc1:C1QRCode> tag to generate the QRCode.

    Source View
    Copy Code
    <cc1:C1QRCode ID="C1QRCode1" runat="server" Text="QRCode Sample Text" />
    

    In Code

    Add the following code to the Page_Load event to add text and generate the QRCode.

    C#
    Copy Code
    C1QRCode1.Text = "QRCode Sample Text";
    

    VB
    Copy Code
    C1QRCode1.Text = "QRCode Sample Text"
    

    What You've Accomplished

    When you run your application, the text that you added to the Text property is encoded into the QRCode.

    When you scan this QRCode using any QRCode reader on a smartphone or any other device, it decodes the text "QRCode Sample Text".