I have a barcode generator that takes information stored in a database and generates a barcode from a databound checkboxlist selection. There are different check boxes, the user checks the boxes of the items they want and enter a universal total.
protected void btnGenerate_Click(object sender, EventArgs e)
{
int n;
int i = Int32.Parse(BatchNumText.Text);
for (n = 1; n <= i; n++)
{
foreach (ListItem item in BatchCode.Items)
{
if(item.Selected)
{
string qt = "n" + item.Text + " QTY:______________";
var barCode = item.Value + datepicker.Text + n.ToString("D2");
//barcode image code
}
}
}
}
What I'd like to know is how can the user select their respective choice on the checkboxlist as well as a different value for each choice on the checkboxlist. For instance:
[]A
Amount:[ ]
[]B
Amount:[ ]
The barcode will generate the data from the databound checboxlist, a date value, and the number corresponding to the amount the user enters. Instead of just one universal total, I'd like to generate different totals corresponding what the user chose to be generated.
