protected override void Render(System.web.UI.HtmlTextWriter writer) { base.CreateChildControls(); try { if (System.Web.HttpContext.Current == null) { writer.WriteLine("Number of child controls : " + this.Controls.Count); } writer.WriteLine("<div id=\"" + this.ClientID + "\" class=\"panel\" style=\"height:" + this.Height.Value + "px;width:" + this.Width.Value + "px;\">"); writer.WriteLine("<div class=\"boxhead\">"); writer.WriteLine("<h2 id=\"" + this.ClientID + "Label\">" + this.Text + "</h2>"); writer.WriteLine("</div>"); writer.WriteLine("<div class=\"boxbody\">"); if (this.hasMenu) { writer.WriteLine("<div id='" + this.ClientID + "_menubackground' class=\"menubar_panel\" style=\"margin-left:2px;width:" + (this.Width.Value - 7) + "px;display:block;\">"); _menu.RenderControl(writer); writer.WriteLine("</div>"); } int upHeight = this.Height.Value - 46; int upWidth = this.Width.Value - 5; if (this.hasMenu) { upHeight = upHeight - 34; } writer.WriteLine("<div id=\"" + this.ClientID + "_content\" class=\"content\" style=\"height:" + (upHeight) + "px;width:" + (upWidth) + "px;\">"); string styleString = ""; foreach (string key in this.Style.Keys) { styleString += key + ":" + this.Style.Item(key) + ";"; } writer.WriteLine("<div style='" + styleString + "'>"); foreach (Control c in this.Controls) { if (!(c.ID == _menu.ID)) { c.RenderControl(writer); } } writer.WriteLine("</div>"); writer.WriteLine("</div>"); writer.WriteLine("</div>"); writer.WriteLine("<div class=\"boxfooter\"></div>"); writer.WriteLine("</div>"); } catch (Exception ex) { this.Page.Trace.Warn("Error rendering umbracopanel control" + ex.ToString); } }
protected override void Render(System.web.UI.HtmlTextWriter writer) { CreateChildControls(); writer.WriteLine("<div id='" + this.ClientID + "' class='tabpage'>"); if (HasMenu) { writer.WriteLine("<div class='menubar'>"); Menu.Width = this.Width; Menu.RenderControl(writer); writer.WriteLine("</div>"); } int ScrollingLayerHeight = ((System.Web.UI.WebControls.WebControl) this.Parent).Height.Value - 22; int ScrollingLayerWidth = ((System.Web.UI.WebControls.WebControl) this.Parent).Width.Value; if (HasMenu) { ScrollingLayerHeight = ScrollingLayerHeight - 28; } writer.WriteLine("<div class='tabpagescrollinglayer' id='" + this.ClientID + "_contentlayer' style='height:" + ScrollingLayerHeight + "px;width:" + ScrollingLayerWidth + "px'>"); string styleString = ""; foreach (string key in this.Style.Keys) { styleString += key + ":" + this.Style.Item(key) + ";"; } writer.WriteLine("<div style='" + styleString + "'>"); foreach (System.Web.UI.Control C in this.Controls) { if (!(C.ClientID == _Menu.ClientID)) { C.RenderControl(writer); } } writer.WriteLine("</div>"); writer.WriteLine("</div>"); writer.WriteLine("</div>"); }