public RenderControl ( System.Web.UI.HtmlTextWriter writer ) : void | ||
writer | System.Web.UI.HtmlTextWriter | The |
리턴 | void |
/// <summary> /// Outputs server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter" /> object and stores tracing information about the control if tracing is enabled. /// </summary> /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> object that receives the control content.</param> public override void RenderControl(HtmlTextWriter writer) { if (this.Visible) { if (this.StartInCodeEditorMode) { _ceEditor.Text = this.Text; this.Text = ""; } RockControlHelper.RenderControl(this, writer); _hfDisableVrm.RenderControl(writer); _hfInCodeEditorMode.RenderControl(writer); _ceEditor.RenderControl(writer); } }
/// <summary> /// Outputs server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter" /> object and stores tracing information about the control if tracing is enabled. /// </summary> /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> object that receives the control content.</param> public override void RenderControl(HtmlTextWriter writer) { if (this.Visible) { if (this.StartInCodeEditorMode) { if (_ceEditor.Text != this.Text) { _ceEditor.Text = this.Text; } // in the case of when StartInCodeEditorMode = true, we can set base.Text to string.Empty to help prevent bad html and/or javascript from messing up things // However, if StartInCodeEditorMode = false, we can't do this because the WYSIWIG editor needs to know the base.Text value base.Text = string.Empty; } RockControlHelper.RenderControl(this, writer); _hfDisableVrm.RenderControl(writer); _hfInCodeEditorMode.RenderControl(writer); _ceEditor.RenderControl(writer); } }
/// <summary> /// Writes the <see cref="T:System.Web.UI.WebControls.CompositeControl" /> content to the specified <see cref="T:System.Web.UI.HtmlTextWriter" /> object, for display on the client. /// </summary> /// <param name="writer">An <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param> protected override void Render(HtmlTextWriter writer) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _tbName.RenderControl(writer); writer.RenderEndTag(); // col-md-6 writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _cbIsActive.RenderControl(writer); _tbUrlSlug.RenderControl(writer); writer.RenderEndTag(); // col-md-6 writer.RenderEndTag(); // row _ceDetails.RenderControl(writer); writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _dtpStart.RenderControl(writer); _dtpEnd.RenderControl(writer); _nbMaxAttendees.RenderControl(writer); _wtpRegistrationWorkflow.RenderControl(writer); writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-8"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _dtpSendReminder.RenderControl(writer); writer.RenderEndTag(); // col-xs-6 writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-4"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _cbReminderSent.Visible = _cbReminderSent.Checked; _cbReminderSent.RenderControl(writer); writer.RenderEndTag(); // col-xs-6 writer.RenderEndTag(); // row writer.RenderEndTag(); // col-md-6 writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ppContact.RenderControl(writer); _pnContactPhone.RenderControl(writer); _ebContactEmail.RenderControl(writer); _cbCost.RenderControl(writer); _cbMinimumInitialPayment.RenderControl(writer); _cbDefaultPaymentAmount.RenderControl(writer); _apAccount.RenderControl(writer); writer.RenderEndTag(); // col-md-6 writer.RenderEndTag(); // row _htmlRegistrationInstructions.RenderControl(writer); _htmlAdditionalReminderDetails.RenderControl(writer); _htmlAdditionalConfirmationDetails.RenderControl(writer); }
/// <summary> /// Outputs server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter" /> object and stores tracing information about the control if tracing is enabled. /// </summary> /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> object that receives the control content.</param> public override void RenderControl(HtmlTextWriter writer) { if (_hfFormGuid.Value.AsGuid() != Guid.Empty) { _hfFormGuid.RenderControl(writer); writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ddlNotificationSystemEmail.RenderControl(writer); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _cbIncludeActions.RenderControl(writer); writer.RenderEndTag(); writer.RenderEndTag(); // row _cbAllowNotes.RenderControl(writer); _ceHeaderText.ValidationGroup = ValidationGroup; _ceHeaderText.RenderControl(writer); // Attributes if (AttributeRows.Any()) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "form-group"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "control-label"); writer.RenderBeginTag(HtmlTextWriterTag.Label); writer.Write("Form Fields"); writer.AddAttribute("class", "help"); writer.AddAttribute("href", "#"); writer.RenderBeginTag(HtmlTextWriterTag.A); writer.AddAttribute("class", "fa fa-question-circle"); writer.RenderBeginTag(HtmlTextWriterTag.I); writer.RenderEndTag(); writer.RenderEndTag(); writer.AddAttribute("class", "alert alert-info"); writer.AddAttribute("style", "display:none"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.RenderBeginTag(HtmlTextWriterTag.Small); writer.Write("The fields (attributes) to display on the entry form"); writer.RenderEndTag(); writer.RenderEndTag(); writer.RenderEndTag(); // Label writer.AddAttribute(HtmlTextWriterAttribute.Class, "grid-table table table-condensed table-light"); writer.RenderBeginTag(HtmlTextWriterTag.Table); writer.RenderBeginTag(HtmlTextWriterTag.Thead); writer.RenderBeginTag(HtmlTextWriterTag.Tr); writer.AddAttribute(HtmlTextWriterAttribute.Class, "grid-columncommand"); writer.RenderBeginTag(HtmlTextWriterTag.Th); writer.Write(" "); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Scope, "col"); writer.RenderBeginTag(HtmlTextWriterTag.Th); writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-3"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.Write("Field"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-9"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-2"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.Write("Visible"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-2"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.Write("Editable"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-2"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.Write("Required"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-2"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.Write("Hide Label"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-2"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.Write("Pre-HTML"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-2"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.Write("Post-HTML"); writer.RenderEndTag(); writer.RenderEndTag(); // row writer.RenderEndTag(); // col-xs-9 writer.RenderEndTag(); // row writer.RenderEndTag(); // th writer.RenderEndTag(); // tr writer.RenderEndTag(); // thead writer.AddAttribute(HtmlTextWriterAttribute.Class, "workflow-formfield-list"); writer.RenderBeginTag(HtmlTextWriterTag.Tbody); foreach (var row in AttributeRows) { row.RenderControl(writer); } writer.RenderEndTag(); // tbody writer.RenderEndTag(); // table writer.RenderEndTag(); // Div.form-group } _ceFooterText.ValidationGroup = ValidationGroup; _ceFooterText.RenderControl(writer); _falActions.RenderControl(writer); writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ddlActionAttribute.RenderControl(writer); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.RenderEndTag(); writer.RenderEndTag(); // row } }