在RenderBeginTag中如何将div放在另一个div上

时间:2011-02-08 12:19:36

标签: asp.net

public override void RenderBeginTag(HtmlTextWriter writer)
{
   writer.RenderBeginTag(HtmlTextWriterTag.Div);
   writer.AddAttribute(HtmlTextWriterAttribute.Class, "HeaderGroupingArea");
   writer.AddAttribute(HtmlTextWriterAttribute.Width, this.Width.ToString());
   writer.AddAttribute(HtmlTextWriterAttribute.Height, this.Height.ToString());
   writer.AddStyleAttribute(HtmlTextWriterStyle.Position, "relative");
   writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID + "_thePanel");
   base.RenderBeginTag(writer);

   writer.RenderBeginTag(HtmlTextWriterTag.Div);
   writer.AddAttribute(HtmlTextWriterAttribute.Class, "ContainerHeaderAreaDefaultText");
   base.RenderBeginTag(writer);
}

0 个答案:

没有答案