http://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.chart.click.aspx
The event handler:
protected void Chart1_Click(object sender, ImageMapEventArgs e)
{
//stuff
}
I would like to raise this event manually.
public ActionResult HistoricalDrillDown(int reportID, string postBackValue)
{
string sessionKey = string.Format("HistoricalReport: {0}", reportID);
LineChart lineChart = (LineChart)Session[sessionKey];
ImageMapEventArgs imageMapEventArgs = new ImageMapEventArgs(postBackValue);
//Raise lineChart.Click() using ImageMapEventArgs
}
I feel like I’m pretty close — I’m just not sure how to broadcast an event using ImageMapEventArgs. Anyone?
Thanks
You should move your code to a separate method and call that method from the handler.
Calling event handlers directly is bad practice.