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;
}
}
}
(you will be redirected to DevExpress.com to submit your response)