Using Microsoft's Chart Controls In An ASP.NET Application: Exporting Charts

The Chart Web control makes it easy to display a chart in an ASP.NET web page. It's quite simple you drag the Chart control onto the page, then set a few properties and either bind it to a data source control or write a code snippet that gets and binds the data of interest. When a page with a Chart control is visited by a user, the Chart control renders an <img> element on the page that displays the rendered chart.

The Chart control is great for displaying a chart on a web page, but what if a user wants to view that chart offline, or send the chart to a colleague? In an earlier installment, Programmatically Generating Chart Images, we examined a number of ways to generate the chart image programmatically. This technique is useful if you want to modify the chart image before displaying it (to, say, add a watermark) or if you want to send the chart to a recipient via email. This technique can also be used to allow the visitor to export the chart image into an alternative format.

This article shows how to let users export a chart from a web page to an alternative format. Specifically, we'll look at adding an "Export" button to the chart web page that, when clicked, exports the chart displayed in the web page to either an image file that can be downloaded or as a PDF file. Click here to read the entire article, Using Microsoft's Chart Controls In An ASP.NET Application: Exporting Charts

Related Articles



About the Author

Scott Mitchell

Scott Mitchell is the Editor, founder, and primary contributor to 4GuysFromRolla.com. In addition to founding 4GuysFromRolla.com, Scott also created ASPFAQs.com and ASPMessageboard.com. He works as a freelance writer, trainer, and consultant and resides in California.

Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Today's agile organizations pose operations teams with a tremendous challenge: to deploy new releases to production immediately after development and testing is completed. To ensure that applications are deployed successfully, an automatic and transparent process is required. We refer to this process as Zero Touch Deployment™. This white paper reviews two approaches to Zero Touch Deployment--a script-based solution and a release automation platform. The article discusses how each can solve the key …

  • Learn How A Global Entertainment Company Saw a 448% ROI Every business today uses software to manage systems, deliver products, and empower employees to do their jobs. But software inevitably breaks, and when it does, businesses lose money -- in the form of dissatisfied customers, missed SLAs or lost productivity. PagerDuty, an operations performance platform, solves this problem by helping operations engineers and developers more effectively manage and resolve incidents across a company's global operations. …

Most Popular Programming Stories

More for Developers

RSS Feeds