c# - Move dynamically created image to a new page -


i can dynamically create barcode using sample tutorials. block of code in loop , generates number of images determined user input. image in place holder , displayed on same webpage. want user able have images on separate page or file them print, i'm not quite sure best approach that. tried placing in session, 1 image opposed amount user entered.

system.web.ui.webcontrols.image imgbarcode = new system.web.ui.webcontrols.image(); using (bitmap bitmap = new bitmap(barcode.length * 27, 100)) {    using (graphics graphics = graphics.fromimage(bitmap))    {        font ofont = new font("idautomationhc39m", 16);        pointf point = new pointf(2f, .2f);        solidbrush blackbrush = new solidbrush(color.black);        solidbrush whitebrush = new solidbrush(color.white);        graphics.fillrectangle(whitebrush, 0, 0, bitmap.width, bitmap.height);        graphics.drawstring("*" + barcode + "*", ofont, blackbrush, point);    }     using (system.io.memorystream ms = new system.io.memorystream())     {          bitmap.save(ms, imageformat.png);          byte[] byteimage = ms.toarray();          convert.tobase64string(byteimage);          imgbarcode.imageurl = "data:image/png;base64," + convert.tobase64string(byteimage);       }          plbarcode.controls.add(imgbarcode); } 


Comments