Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi all,

I have an ajax tab container with many ajax tabs that looks like this: (See here: http://i.stack.imgur.com/3zdox.png).

Question: Does anyone know for content in each ajax tabs, how can I save them as one image? Let's say in Tab1 there are many images inside, how can I save Tab1 content as one image?

This is what I have tried but got error:
C#
foreach (Panel px in new Panel[] { p1, p2, p3, p4 } )
using (Bitmap bmp = new Bitmap(pX.ClientSize.Width, pX.ClientSize.Height))
{
    pX.DrawToBitmap(bmp, pX.ClientRectangle);
    bmp.Save(somefolder + pX.Name + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
}

Please help me on this thanks!
Posted
Updated 14-Oct-15 23:04pm
v4
Comments
Did you try anything?
Member 11999641 15-Oct-15 5:06am    
hi, I have posted what I have tried in my post: foreach (Panel px in new Panel[] { p1, p2, p3, p4 } )
using (Bitmap bmp = new Bitmap(pX.ClientSize.Width, pX.ClientSize.Height))
{
pX.DrawToBitmap(bmp, pX.ClientRectangle);
bmp.Save(somefolder + pX.Name + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
}.
My tab panels are created dynamically and inside each tab there are different image content. I want to save content from each tab as one image..have researched for quite awhile but couldn't find much useful info..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900