Hello,
playing with using barcodes with the following method:
http://www.techrepublic.com/blog/howdoi/how-do-i-generate-barcodes-using-c/173
all works fine.
However, I'm going to be making UI that needs to allow the user to generate barcodes, more than one on a page, for printing. So I need to control the placement of the generated barcodes.
Is there are way to intermingle the writing of the Bitmap objects (in gif format) with literal markup so I can control layout? Example of what I mean by writing of the Bitmap objects to the response stream:
Response.ContentType = "image/gif"; Response.Clear(); Bitmap Barcode = CreateBarcode(txtInput.Text.Trim()); Barcode.Save(Response.OutputStream, ImageFormat.Gif);
the URL at the top shows what I'm working with, it's a simple example of how to generate 'a' barcode. I need to generate several barcodes based on user input and control the layout on the page. I know I could save them to disk and then programatically manipulate an asp.net Literal control but I'm wondering if there is a way I can skip the step of saving to disk?
obvoiusly the example code above includes setting contentType of the response and it calls Clear() method which are issues... well, maybe. Setting contentType to image/gif probably is an issue, if I want to actually return html with images embeded where I want them... I'm assuming I can't do this, but wanted to throw it out here before going the route of saving files to disk first. I tried inserting the method calls using <% %> inline code to control placement, but without content type set to image/gif it just spit out the image data like you would see it if you opened a GIF image in notepad, not surprising.
any way to do this? or should I just go with saving the generated image files to disk first?