Posted 8 June 2020, 7:42 am EST
Dear Sir or Madam:
I am developing a web site using ASP.Net 4.6.1 and incorporation C1 Graphs and Charts (ver 4.5.20193.322) using Visual Studio 201312.40629.00 upd 5. I am trying to get the ASPNET Export Service working, with rather mixed results. The system is set to export PNG Files from the web page, and I have buttons with the following JavaScript attached:
<asp:PlaceHolder runat=“server”>
$(function () {
$(“#exportImage”).click(exportImage);
});
function getChart() {
var Graph = $("#<%=bcKitCount.ClientID%>"); return Graph; } // Export function function exportImage() { var fileName = "LotarTheBonnet"; var type = "Png"; var url = "http://demos.componentone.com/ASPNET/ExportService" + "/exportapi/chart"; var chart = getChart(); $("#<%=bcKitCount.ClientID%>").c1barchart("exportChart", fileName, type, url); } </script> </asp:PlaceHolder>
This is pretty close to the example given on the ComponentOne site. The trouble is, on older systems (Windows XP with Internet Explorer 8) it seems to work, prompting you to save in the download folder, or where you like. But in more modern Systems (Win10, Chrome Browser, etc.) it just fails silently, no error, nothing, just a web page postback from the button click.
The other problem is the url. I use your demo example (as above) and it may work, but when I try to use our own (localhost/exportapi/chart or localhost/ C1ASPNETExportService/exportapi/chart) the system fails, once again without an error. I have the Service installed on IIS (7.0), as per default. Please help.