Barcode in browser

I am looking for an example of how to display a newly created bar code in a browser using C#. Thanks


Thanks for your inquiry. I would like to update you that you can get a bar code image stream and then display inside an image tag in an aspx page. Please try the following source code below:

BarCodeBuilder builder = new BarCodeBuilder(“Code text here”, Symbology.Pdf417);

MemoryStream thumbnailStream = new MemoryStream();

builder.Save(thumbnailStream, BarCodeImageFormat.Png);

byte[] inStream;

inStream = thumbnailStream.ToArray();

string base64String = Convert.ToBase64String(inStream);

img1.Src = “data:image/png;base64,
" + base64String;

<img id=“img1” alt=“Red dot” src=”" runat=“server”/>

In addition, you can also try using a BarCodeWebControl in your .NET web applications. Please visit the documentation link here:

Please do let me know in case of any confusion or questions.