How can I prevent Telerik RadChart from generating an onerror attribute?
- by Sean McMillan
We're using the Telerik Rad Controls for ASP.Net Ajax on an ASP.Net MVC project. The RadChart generates the following HTML:
<img onerror="if(confirm('Error loading RadChart image.\nYou may also wish to check the ASP.NET Trace for further details.\nDisplay stack trace?'))window.location.href=this.src;" src="ChartImage.axd?UseSession=true&ChartID=e25ad666-e05b-4a92-ac0c-4f2c729b9382_chart_ctl00$MainContent$AverageCTMChart&imageFormat=Png&random=0.501658702968461" usemap="#imctl00_MainContent_AverageCTMChart" style="border-width: 0px;" alt="">
I'd like to remove the onerror attribute; I don't really want the customers being offered the option to see a stack trace if something goes wrong. I can't see any way to control the markup that this control generates. Google searches provide no help. Has anyone dealt with this before?
How do I remove the onerror attribute?