Click here to Skip to main content
16,016,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to generate an image from a panel on the webform page? These are some items like labels on the panel. How to resolve the problem, please help me, thank you very much.

that's the panel's html code. I want to get the image from the render panel.
generate a image from a panel webcontrol.


XML
<asp:Panel ID="legendPanel" runat="server" Visible="false">
         <div style="position:absolute;top:80px;left:80px;">
            <table border="0px">
              <tr><td colspan="2">单位:mm</td></tr>
              <tr>
                  <td>
                     <asp:Label ID="color1" runat="server" Text="" Width="30px" Height="10px"></asp:Label>
                  </td>
                  <td align="left">
                    <asp:Label ID="Lable1" runat="server" Text=""  Height="10px" >
                    </asp:Label>
                  </td>
              </tr>
              
              <tr>
                   <td>
                     <asp:Label ID="color2" runat="server" Text="" Width="30px" Height="10px">
                     </asp:Label>
                   </td>
                   <td align="left">
                     <asp:Label ID="Label2" runat="server" Text=""  Height="10px">
                     </asp:Label>
                   </td>
              </tr>
              
              <tr>
                    <td>
                      <asp:Label ID="color3" runat="server" Text="" Width="30px" Height="10px">
                      </asp:Label>
                    </td>
                    <td align="left">
                      <asp:Label ID="Label3" runat="server" Text=""  Height="10px">
                      </asp:Label>
                    </td>
              </tr>
              
              <tr>
                    <td>
                      <asp:Label ID="color4" runat="server" Text="" Width="30px" Height="10px">
                      </asp:Label>
                    </td>
                    <td align="left">
                      <asp:Label ID="Label4" runat="server" Text=""  Height="10px">
                      </asp:Label>
                    </td>
              </tr>
              
              <tr>
                    <td>
                    <asp:Label ID="color5" runat="server" Text="" Width="30px" Height="10px">
                    </asp:Label>
                    </td>
                    <td align="left">
                    <asp:Label ID="Label5" runat="server" Text=""  Height="10px">
                    </asp:Label>
                    </td>
              </tr>
              
              <tr>
                    <td>
                      <asp:Label ID="color6" runat="server" Text="" Width="30px" Height="10px">
                      </asp:Label>
                    </td>
                    <td align="left">
                      <asp:Label ID="Label6" runat="server" Text=""  Height="10px">
                      </asp:Label>
                    </td>
              </tr>
            </table>
         </div>
</asp:Panel>
Posted
Updated 7-Jun-10 21:23pm
v4
Comments
Ankur\m/ 8-Jun-10 0:54am    
Didn't get you. Please explain more.
yuxuetaoxp 8-Jun-10 1:09am    
what's your emailbox? I cannot upload picture to this website.In my webpage, these are maps and maplegend.The legend is a panel which has many labels.I want to save the map and maplegend in a image.do you think how to resolve the problem? ??:mm
Sandeep Mewara 8-Jun-10 2:09am    
What do mean by generate an image from panel? UPDATE the question with more details (code snippet if needed). Use 'Improve Question' button.
yuxuetaoxp 8-Jun-10 3:47am    
What's your emailbox,I can't upload the picture into this webpage.
Sandeep Mewara 8-Jun-10 4:03am    
Do you want to have an image OF panel? like a screenshot using code?

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