ASP. One-dimensional barcode generation, a total of 32 format types

Source: Internet
Author: User

Want to use the ASP. NET to realize the barcode function, online find the code is not complete.

Finally found a very full DLL is WinForm, originally thought could not be used on the web results can use.

First, the reference DLL does not have to be said, the following is the usage settings. There are a lot of setting parameters, I wonder.

DLL Http://pan.baidu.com/s/1jGfwcVc

Example code: Http://pan.baidu.com/s/1kT7etvD (Version WinForm)

Example code for ASP:

 PublicActionResult Test () {varBar =NewCobainsoft.Windows.Forms.BarcodeControl (); Bar. Addoncaption=NULL; Bar. Addondata=NULL; Bar. BackColor=System.Drawing.Color.White; Bar. Barcodetype=Cobainsoft.Windows.Forms.BarcodeType.CODE39; Bar. Font=NewSystem.Drawing.Font ("Arial", 9F); Bar. ForeColor=System.Drawing.Color.Black; Bar. HorizontalAlignment=Cobainsoft.Windows.Forms.BarcodeHorizontalAlignment.Center; Bar. Invaliddataaction=Cobainsoft.Windows.Forms.InvalidDataAction.DisplayInvalid; Bar. Location=NewSystem.Drawing.Point (3,3); Bar. Lowertoptextby=0F; Bar. Raisebottomtextby=0F; Bar. Size=NewSystem.Drawing.Size (218, the); Bar. Barcodetype=The cobainsoft.windows.forms.barcodetype.code128c;//enumeration generates bar according to what format. Showcode39startstop=true;//Code39 If there is an asteriskBar. Data ="88808411";//Barcode DataBar. Addondata ="";//DateBar. TextPosition = Cobainsoft.Windows.Forms.BarcodeTextPosition.Below;//data displayed at the bottom of the barcodeBar. Stretchtext =true; Bar. CopyRight="Cydiy"; Bar.            Invalidate (); //Stream stream = new FileStream ("D://100.png ", FileMode.Create, FileAccess.Write, Fileshare.none); //Bar. Makeimage (System.Drawing.Imaging.ImageFormat.Png, 1, +, true, false, NULL, stream);Bar. SaveImage (System.Drawing.Imaging.ImageFormat.Png,2, -,true,false,NULL,"D://1.png"); return NULL; }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.