public static void InjectIEEdgeCompatModeMeta(Control parent) { if (RenderUtils.Browser.IsIE) { ASPxWebControl.SetIECompatibilityModeEdge(parent); } }
protected override void OnActionExecuted(ActionExecutedContext filterContext) { base.OnActionExecuted(filterContext); if (RenderUtils.Browser.IsIE) { bool isDemoRequiredCompatibilityMode = IsDemoRequiredCompatibilityMode() && !Utils.IsIE10(); if (isDemoRequiredCompatibilityMode) { ASPxWebControl.SetIECompatibilityMode(IECompatibilityVersion); } else { ASPxWebControl.SetIECompatibilityModeEdge(); } } }
protected override void OnActionExecuted(ActionExecutedContext filterContext) { base.OnActionExecuted(filterContext); if (RenderUtils.Browser.IsIE) { var isDemoRequiredCompatibilityMode = IsDemoRequiredCompatibilityMode(); if (isDemoRequiredCompatibilityMode) { ASPxWebControl.SetIECompatibilityMode(IECompatibilityVersion); } else { ASPxWebControl.SetIECompatibilityModeEdge(); } var IEVersion = isDemoRequiredCompatibilityMode ? IECompatibilityVersion.ToString() : "edge"; ViewData["MetaContent"] = string.Format("<meta http-equiv=\"X-UA-Compatible\" content=\"IE={0}\" />", IEVersion); } }