Skip to content

Use our Barcode Generation API in ASP.NET to generate and display a barcode image on the webpage.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/barcode-generation-library-display-a-barcode-in-a-web-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to create and display a BarCode in a web application

Overview

Important

The Universal Subscription or an additional Office File API Subscription is required to use this example in production code. For pricing information, please refer to the DevExpress Subscription page.

This example illustrates how you can use our Barcode Generation API in ASP.NET to generate and display a barcode image on the webpage. The best approach implies creating a custom HTTP handler that generates and outputs an image. Here is a code of this handler:

public class BarCodeHandler : IHttpHandler {
    public void ProcessRequest(HttpContext context) {
        BarCode barCode = new BarCode();

        barCode.Symbology = Symbology.QRCode;
        barCode.CodeText = "123";

        context.Response.ContentType = "image/png";
        barCode.Save(context.Response.OutputStream, ImageFormat.Png);
        context.Response.End();
    }

    public bool IsReusable {
        get {
            return false;
        }
    }
}

Files to Review

See Also:

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Use our Barcode Generation API in ASP.NET to generate and display a barcode image on the webpage.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •