我正在使用此代码从后面的代码创建 DIV 控件-
System.Web.UI.HtmlControls.HtmlGenericControl dynDiv =
new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");
dynDiv.ID = "dynDivCode";
dynDiv.Style.Add(HtmlTextWriterStyle.BackgroundColor, "Gray");
dynDiv.InnerHtml = "I was created using Code Behind";
this.Controls.Add(dynDiv);
创建后,我想访问它的高度和宽度。有可能这样做吗?还是此时它没有在屏幕上呈现以使其属性可访问?