ASP.NET 4.0对清洁生产法进行了修改,其中包括:
xhtmlConformance is set to Strict.
Menus are rendered as lists rather than tables
Extraneous properties like border=0 are removed from the emitted markup. Even the error text on validation controls is no longer set to red.
The rendering of the outer table for templated controls can now be controlled with the newRenderOuterTable property.
For compatibility, you can make your output look the same as it did in ASP.NET 3.5 with the controlRenderingCompatibilityVersion
> <?xml version="1.0"?> <configuration> <system.web>
> <compilation debug="false" targetFramework="4.0" />
> <pages controlRenderingCompatibilityVersion="3.5" /> </system.web> </configuration>
可在http://msdn.microsoft.com/en-us/library/system.web.ui. Control.renderingcompatibility.aspx 查询。
我非常高兴地解决这个问题。 我感到惊讶的是,我找不到更多人来回答这一问题。 我认为,在我的案件中,采用这种兼容性办法,或将我的所有验证控制委托给Red。