반응형
aspx단에 Panel컨트롤 생성
<asp:Panel ID="pnl" runat="server"></asp:Panel>
System.Web.UI.WebControls.Image obj = new System.Web.UI.WebControls.Image();
System.IO.MemoryStream ms = new System.IO.MemoryStream();
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
obj.ImageUrl = "data:image/png;base64," + Convert.ToBase64String(ms.ToArray(), 0, ms.ToArray().Length);
obj.ID = "img" + ii.ToString();
pnl.Controls.Add(objImg);
Panel에 Image컨트롤을 추가하는 방식