/// <summary> /// Notifies server controls that use composition-based implementation to create any child /// controls they contain in preparation for posting back or rendering. /// </summary> protected override void CreateChildControls() { try { string topicName = string.Empty; _form = new OWSForm(); Controls.Add(_form); _form.Controls.Add(BuildBasePageLinks()); _form.Controls.Add(new LiteralControl("<br>")); _form.Controls.Add(new LiteralControl("<table cellspacing=1 cellpadding=4 width=100% align=center border=1>")); _form.Controls.Add(new LiteralControl("<tr>")); _form.Controls.Add(new LiteralControl(string.Format("<td class=ms-ToolPaneTitle align=middle colspan=2>{0}</td>", _postModeTitle))); OWSLabelField lblSubject = new OWSLabelField(); lblSubject.Text = "Subject:"; _txtSubject = new OWSTextField(); _txtSubject.ID = "txtSubject"; _txtSubject.NumLines = 1; if (MessageMode != PostMode.New) { lblSubject.Visible = false; _txtSubject.Text = topicName; _txtSubject.Visible = false; } CreatePreviewSection(); CreateMessageBodySection(topicName); CreateButtonSection(); _form.Controls.Add(new LiteralControl("</table>")); } catch (Exception ex) { WebPartParent.AddError(ex); } }