protected override void CreateChildControls() { HtmlGenericControl activeX = new HtmlGenericControl("object"); activeX.Attributes["classid"] = OfficeViewerWrapperSettings.GetConfig().ClassID; activeX.Attributes["id"] = ViewerControlID; activeX.Attributes["codebase"] = OfficeViewerWrapperSettings.GetConfig().Codebase; activeX.Attributes["width"] = "100%"; activeX.Attributes["height"] = "100%"; activeX.Controls.Add(CreateParamElement("LicenseName", OfficeViewerWrapperSettings.GetConfig().LicenseName)); activeX.Controls.Add(CreateParamElement("LicenseCode", OfficeViewerWrapperSettings.GetConfig().LicenseCode)); activeX.Controls.Add(CreateParamElement("Toolbars", ShowToolbars ? -1 : 0)); this.Controls.Add(activeX); base.CreateChildControls(); }