通过


PagesSection.ControlRenderingCompatibilityVersion 属性

定义

获取或设置一个值,该值指定任何呈现的 HTML 将与之兼容的 ASP.NET 版本。

public:
 property Version ^ ControlRenderingCompatibilityVersion { Version ^ get(); void set(Version ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Web.Configuration.VersionConverter))]
[System.Configuration.ConfigurationProperty("controlRenderingCompatibilityVersion", DefaultValue="4.0")]
[System.Configuration.ConfigurationValidator(typeof(System.Web.Configuration.VersionValidator))]
public Version ControlRenderingCompatibilityVersion { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Web.Configuration.VersionConverter))>]
[<System.Configuration.ConfigurationProperty("controlRenderingCompatibilityVersion", DefaultValue="4.0")>]
[<System.Configuration.ConfigurationValidator(typeof(System.Web.Configuration.VersionValidator))>]
member this.ControlRenderingCompatibilityVersion : Version with get, set
Public Property ControlRenderingCompatibilityVersion As Version

属性值

任何呈现的 HTML 都将兼容的 ASP.NET 版本。

属性

例外

尝试将此属性设置为 null

注解

此值由 controlRenderingCompatibilityVersion Web.config 文件中元素的属性 pages 设置。 此属性的值是该属性的 Control.RenderingCompatibility 默认值。 有关其使用方式的信息,请参阅属性 Control.RenderingCompatibility

适用于

另请参阅