export an asp:panel control as an image

Posted by Modit under ASP.NET on 7/16/2011 | Points: 10 | Views : 2659 | Status : [Member] | Replies : 4
hi i have a panel that have many image controls in it. The images in image control are being generated dynamically. What i want to do is have a button in the page and when the user clicks it the panel (containing all the dynamically generated images in it) save on users hard disk as an image.




Responses

Posted by: DotnetGuy on: 7/17/2011 [Member] Starter | Points: 25

Up
0
Down
Hi ,
you are giving images dynamically to the imagecontrol ,means you are binding images from any saved location, is my assumption right ? ,replicate your requirement clearly





Modit, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Modit on: 7/17/2011 [Member] Starter | Points: 25

Up
0
Down
hi, yes the images are generated dynamically. Actually what is going to happen is there are some values in database which will be checked when the page loads and according to that the image controls will get the location of the images.

Modit, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: DotnetGuy on: 7/17/2011 [Member] Starter | Points: 25

Up
0
Down
If it is dynamical then take a datalist and keep Image control in the ItemTemplate

<asp:Panel ID="pnlImages" runat="server">
<asp:DataList ID="DataList1" runat="server" >
<ItemTemplate>
<asp:Image ID="img" runat="server" ImageUrl='<%# Eval("ImageUrl") %>' />
</ItemTemplate>
</asp:DataList>
</asp:Panel>
follow above code
Here my question is do you want save all images in the Panel as single Image ?










Modit, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Modit on: 7/17/2011 [Member] Starter | Points: 25

Up
0
Down
actually the images will be alined as a sequence like a grid , after it has been placed the user can save the images as a single image.

Modit, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response