Barcode generation usingBarcode Rendering Framework in web application

╄→гoц情女王★ 提交于 2019-12-06 01:13:43

You can use the same code in ASP.NET, but you need to output the image via HTTP.

Say you have an ASP.NET web page that contains the following:

<IMG SRC="BarCode.aspx?par1=HelloWorld40OrWhatever" />

Then your BarCode.aspx page must generate and output the image:

Code39BarcodeDraw barcode39 = BarcodeDrawFactory.Code39WithoutChecksum;
System.Drawing.Image img = barcode39.Draw("Hello World", 40);

Response.Clear();
Response.Type = "image/png";
img.Save(Response.OutputStream, Imaging.ImageFormat.Png);
Response.Flush();
Response.End();
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!