How can I prevent Telerik RadChart from generating an onerror attribute?

Posted by Sean McMillan on Stack Overflow See other posts from Stack Overflow or by Sean McMillan
Published on 2010-04-15T13:18:44Z Indexed on 2010/06/12 23:02 UTC
Read the original article Hit count: 523

Filed under:
|
|

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&amp;ChartID=e25ad666-e05b-4a92-ac0c-4f2c729b9382_chart_ctl00$MainContent$AverageCTMChart&amp;imageFormat=Png&amp;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?

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-mvc