I want to print all QR Code which is bind in gridview ,
i want to clich click a button and print all QR Code In Once click.
The below image is gridview data bind in asp.net

I want to print all QR Code which is bind in gridview ,
i want to clich click a button and print all QR Code In Once click.
The below image is gridview data bind in asp.net

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Deepak RawatPosted Jun 6, 2023, 10:02 AM
here is code you can try:
protected void PrintButton_Click(object sender, EventArgs e)
{
foreach (GridViewRow row in YourGridView.Rows)
{
// Access data associated with each row
string qrCodeData = row.Cells[0].Text; // Assuming QR Code data is in the first column
// Generate QR Code for each row's data
Bitmap qrCodeImage = GenerateQRCode(qrCodeData); // Use your QR Code generator function
// Print the QR Code image
PrintQRCode(qrCodeImage); // Implement the printing logic
// Dispose the QR Code image to free resources
qrCodeImage.Dispose();
}
}
Amit MohantyPosted May 16, 2023, 1:10 PM
Use this
Rajkiran SwainPosted May 16, 2023, 12:26 PM
Sandeep KumarPosted May 16, 2023, 11:35 AM
This line error showing
Bitmap qrCodeImage = new Bitmap(placeholderQRCode.Width, placeholderQRCode.Height);
Amit MohantyPosted May 16, 2023, 10:59 AM
For Placeholder control:
Sandeep KumarPosted May 16, 2023, 10:13 AM
i am using PlaceHolder control in place of Image in gridview ItemTemplate
Amit MohantyPosted May 16, 2023, 9:10 AM
Try this
Sandeep KumarPosted May 16, 2023, 8:59 AM
All Qr Code should be in one page
Amit MohantyPosted May 16, 2023, 8:48 AM
Check this
Sandeep KumarPosted May 16, 2023, 8:42 AM
row.Cells[1].Text; // Use the correct column index
i used this but still it has ""(blank) value
Rajkiran SwainPosted May 16, 2023, 8:23 AM
Sandeep KumarPosted May 16, 2023, 7:55 AM
Always Showing ""(Blank) thst's why not working
string qrCodeValue = row.Cells[0].Text;
Rajkiran SwainPosted May 16, 2023, 7:23 AM