using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.IO; namespace EMIS.Web.Controls { public class CompatibleReportViewer : Microsoft.Reporting.WebForms.ReportViewer { protected override void Render(HtmlTextWriter writer) { if (!HttpContext.Current.Request.Browser.Browser.Contains("InternetExplorer")) { using (StringWriter sw = new StringWriter()) { HtmlTextWriter tmpWriter = new HtmlTextWriter(sw); base.Render(tmpWriter); string val = sw.ToString(); val = val.Replace(@"!= 'javascript:\'\''", @"!= 'javascript:\'\'' && false"); writer.Write(val); } } else { base.Render(writer); } } } }