Skip to main content
A newer version of this page is available.
Tab

ASPxWebControl.SetIECompatibilityMode(Int32, Control) Method

OBSOLETE

Use another overload of this method instead.

Switches all DevExpress controls on the specified page to use the specified IE version.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

[Obsolete("Use another overload of this method instead.")]
public static void SetIECompatibilityMode(
    int IEVersion,
    Control pageOrMasterPage
)

Parameters

Name Type Description
IEVersion Int32

An integer value that specifies the Internet Explorer browser version.

pageOrMasterPage Control

A Control object that specifies a web page (or master page) whose response renders the X-UA-Compatible header.

Remarks

A call to the SetIECompatibilityMode method changes the render manner of all DevExpress controls on a page, so that they behave correctly under the specified IE version.

Note

This overload is not applicable to the ASP.NET MVC environment, because there is no such Page object in MVC as in ASP.NET WebForms.

Note that the SetIECompatibilityMode method does not allow setting the IE version/mode for our controls to one that is higher than the one specified in the User-Agent parameter. This means that calling ASPxWebControl.SetIECompatibilityMode(9) does nothing if a request has been sent from IE8. To elevate the IE version, use the ASPxWebControl.SetIECompatibilityModeEdge method. It allows you to force all DevExpress ASP.NET controls on the specified page to use the latest available IE version.

This method is useful when it is necessary to switch all DevExpress controls on the specified page to use the specified IE version at runtime. To accomplish this task declaratively, consider using the IE Compatibility Version configuration option.

Refer to the KA18646 Knowledge Base article to learn more.

Example for ASP.NET WebForms

Code behind:

protected void Page_PreInit(object sender, EventArgs e) {
    DevExpress.Web.ASPxWebControl.SetIECompatibilityMode(8, this.Master);
}
See Also