在Web应用程序栏code代usingBar code渲染架构 [英] Barcode generation usingBarcode Rendering Framework in web application
问题描述
我用吧code渲染架构产生酒吧code。我已经下载了dll的。我可以看到,它如何能够在windows应用程序来完成。我想这样做同样的即产生了吧code和在Web应用程序中使用它。
以下是连结为可以B中使用的问题。
免费酒吧$ C $以下C API用于.NET ,是code:
i am using Barcode Rendering Framework for generating a barcode. I have downloaded their dll's. I can see,how it can be done in windows application. I want to do the same i.e generating the barcode and using it in web application. Following is the link for the question that can b used. Free Barcode API for .NET and following is the code :
Code39BarcodeDraw barcode39 = BarcodeDrawFactory.Code39WithoutChecksum;
System.Drawing.Image img = barcode39.Draw("Hello World", 40);
pictureBox1.Image = barcode39.Draw("Hello World", 40);
我如何使用相同的功能的Web应用程序。
How can I use the same functionality in web application.
推荐答案
您可以使用ASP.NET同一code,但你通过HTTP需要输出的图像。
You can use the same code in ASP.NET, but you need to output the image via HTTP.
假设你有一个ASP.NET网页,其中包含以下内容:
Say you have an ASP.NET web page that contains the following:
<IMG SRC="BarCode.aspx?par1=HelloWorld40OrWhatever" />
那么你的酒吧code.aspx
页必须生成并输出图像:
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();
这篇关于在Web应用程序栏code代usingBar code渲染架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!