【发布时间】:2009-11-04 00:50:54
【问题描述】:
如何在设计时更改 iframe 背景颜色?
通过设计时,我的意思是: 我的类扩展了 CompositeControl,我在其中实现了设计时支持。
这是 CreateChildControls() 的一部分:
editor = new HtmlGenericControl("iframe");
editor.ID = "editorID";
editor.Style["background-color"] = "Red";
editor.Style["color"] = "Black";
editor.Style["position"] = "absolute";
editor.Style["left"] ="0px";
editor.Style["top"] = "0px";
editor.Attributes["width"] = editorWidth.ToString() + "px";
editor.Attributes["height"] = editorHeight.ToString() + "px";
editor.Attributes["frameborder"] = "0";
editor.Attributes["scrolling"] = "auto";
【问题讨论】: