使用.SaveImage()保存图表图像 [英] Saving chart images with .SaveImage()
本文介绍了使用.SaveImage()保存图表图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人成功保存了一个asp.net图表吗?我已经尝试过使用.saveimage()函数进行所有操作,但无法使其正常工作.
我正在使用 ^ ]
如果您有一些有效的代码或知道如何使用,那么一切都会有所帮助.如果您知道如何将其保存为pdf,则可以加分:)
Has anyone successfully saved an asp.net chart? I''ve tried everything with the .saveimage() function but can''t get it to work.
I''m using [^]
If you have some working code or know how, anything would help. Bonus points if you know how to save it to pdf :)
推荐答案
我已经知道如何将图像写入pdf.在这里,我为此提供了链接.
http://www.mikesdotnetting. com/Article/115/Microsoft-Chart-Controls-to-PDF-with-iTextSharp-and-ASP.NET-MVC
还有一个链接是在asp.net中进行pdf处理的
http://www.codeproject.com/KB/aspnet/Creating_PDF_documents_in.aspx
希望对您有所帮助.
最好.
Hi,
I''ve idea on how to write images into pdf .Here ''m providing link for that .
http://www.mikesdotnetting.com/Article/115/Microsoft-Chart-Controls-to-PDF-with-iTextSharp-and-ASP.NET-MVC
And onemore link is here for pdf handling in asp.net
http://www.codeproject.com/KB/aspnet/Creating_PDF_documents_in.aspx
I hope it can help you.
All the best.
是的,我通过添加ImageLocation
使用asp.net图表控件保存图像.
Yes i am saving image using asp.net chart control by adding ImageLocation
<asp:Chart ID="chartIncomeVsExpense" runat="server" BackColor="#f6f6f6" BorderSkin-SkinStyle="None"
BackSecondaryColor="White" BackGradientStyle="None" Palette="BrightPastel" BorderColor="26, 59, 105"
Height="300px" Width="935px" BorderWidth="2" ImageLocation="~/TempImages/ChartPic_#SEQ(300,3)">
您需要设置您的web.config文件
You need to set your web.config file
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=~/FolderName/Temppdf/;" />
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false" />
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<remove name="ChartImageHandler" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd"
preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD"
path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD"
path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
这篇关于使用.SaveImage()保存图表图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文