Skip to main content

Posts

Showing posts from June, 2011

Show Download Image Popup On Button Click...

How to show the download Popup when we click on the button? Add this code in Button Click Event  Protected Sub btnExportToImage_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExportToImage.Click {  Response.ContentType = "png"  Response.AppendHeader("Content-Disposition", "attachment; filename=TopIndustry.png")  Response.TransmitFile(Server.MapPath("~/TempImageFiles/" + Session("ImageName").ToString()))  Response.End() } - Image is stored on the server. - so in this example image name is set on runtime and stored in to the session. - On button click  End Sub It will show the Output:

Chart image is not showing up when using ASP.NET charting control on Live Server

Step :1 Change in web.config file: add Url=~/TempImages/; in below line.. < add key = "ChartImageHandler" value = "Storage=file;Timeout=20; Url=~/TempImages/; " /> Here, TempImages is folder name which is already created to store the chart image. Step :2 Change ImageStorageMode of chartcontrol to " UseImageLocation"

Microsoft Charting [ Show All Skipped Labels on the X-Axis ]

Just about everyone who has worked with category names on the Microsoft Reporting Services or .NET chart has encountered this problem: you databind categorical values from a database, but when it is displayed on the chart, it skips labels on the x-axis, like below: How Do I Show All Labels on the X-Axis? Method 1: Set the Interval property on the x-axis to 1 in properties: Method 2: Set the Interval property on the x-axis to 1 in Load Event chartname.ChartAreas[0].AxisX.Interval = 1; Result: