using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace umbraco.uicontrols { public class TabPage : System.Web.UI.WebControls.WebControl { // Ensure that a TabPage cannot be instatiated outside // this assembly -> New instances of a tabpage can only be retrieved through the tabview private bool _hasMenu = true; private ScrollingMenu _Menu = new ScrollingMenu(); protected LiteralControl ErrorHeaderControl = new LiteralControl(); private ValidationSummary _vs = new ValidationSummary(); private Control _tempErr = new Control(); internal TabPage() { } public ValidationSummary ValidationSummaryControl { get { return _vs; } } public string ErrorHeader { get; set; } public string CloseCaption { get; set; } public Control ErrorControl { get { return _tempErr; } } protected override void OnLoad(EventArgs e) { if (this.HasMenu) { Menu.Width = System.Web.UI.WebControls.Unit.Pixel((int)this.Width.Value - 12); _Menu.ID = this.ID + "_menu"; this.Controls.Add(_Menu); } } protected override void OnInit(EventArgs e) { base.OnInit(e); _vs.ShowSummary = true; _vs.Attributes.Remove("style"); _vs.Style.Clear(); _vs.ForeColor = new Color(); _vs.ID = String.Format("{0}_validationSummary", this.ID); // Add error pane _tempErr.Visible = false; _tempErr.ID = String.Format("{0}_errorPaneContainer", this.ID); _tempErr.Controls.Add(new LiteralControl("
")); _tempErr.Controls.Add(_vs); _tempErr.Controls.Add(new LiteralControl("