先看看这篇文章:http://www.codeproject.com/KB/GDI-plus/GenCode128.aspx 取得GenCode128.dll,然后引入: usingGenCode128; 主要代码如下: stringnum=Request.QueryString["code"]; System.Drawing.Imagemyimg=Code128Rendering.MakeBarcodeImage(num,2,true); System.IO.MemoryStreamms=newSystem.IO.MemoryStream(); myimg.Sa