Generating Bar code
install OnBarcode.Barcode;
C# Code
On the button click event
- protected void btnGenerateCode_Click(object sender, EventArgs e)
- {
- Linear barcode = new Linear();
-
- barcode.Data = txtBarcode.Text;
- barcode.ShowText = true;
-
- Random rd = new Random();
- string path = Server.MapPath("~/Images/" + txtBarcode.Text + ".png");
- barcode.drawBarcode(path);
- imgBarcode.ImageUrl ="~/Images/" + txtBarcode.Text + ".png";
- txtBarcode.Text = "";
}