容易解释一下。有没有什么办法可以做到这一点:将动态dotnet webcontrol添加到静态html的属性值中
<div id="header" style='<asp:Literal runat="server" ID="litBackgroundImage"></asp:Literal>' >
它看起来有效,但Visual Studio将无法识别litBackgroundImage在代码中隐藏的有效控制。将div设置为runat =“server”将不起作用,因为style属性是只读的。
任何建议感激地接受
不能设置样式动态,正如我上面所说 - 它是只读的。 – 2010-09-22 16:02:48
@Matt,我认为BlueCode正在讨论使用Attributes属性而不是Style属性。 – 2010-09-22 17:22:13