Skip to content

<HtmlInput>

The HtmlInput tag renders as a rich text editor at run time, allowing users to enter and format text as they would in a word processor. Behind the scenes, it uses the default rich text editor configured for your DNN site.

Example

html
<AddForm>
  ...
  <table>
    ...
    <tr>
      <td>
        <Label For="txtBio" Text="Bio" />
        <HtmlInput Id="txtBio" DataField="Bio" DataType="String"
          Width="600" Height="400"/>
      </td>
    </tr>
    ...
    <tr>
      <td colspan="2">
        <AddButton Text="Add"/>&nbsp;<CancelButton Text="Cancel"/>
      </td>
    </tr>
  </table>
</AddForm>

Properties

PropertyValuesDefaultDescription
ID *stringUnique identifier for the control within the form
DataFieldstringParameter name for data binding to your form's data commands
DataTypeStringStringDatabase type — always String for this control
HeightsizeHeight of the control
NullableTrue FalseFalseReturns DBNull when the control is blank or whitespace
VisibleTrue FalseTrueShows or hides the control
WidthsizeWidth of the control

* Required property

Validating the HtmlInput Control: The nature of the HtmlInput control does not allow it to be validated on the client. If you use a validator with this control, set the EnableClientScript attribute to false.

Property Details

  • ID: Name, consisting of letters and numbers, beginning with a letter, that uniquely identifies the control within the form.

  • DataField: Name of the parameter in the <SubmitCommand> which will be filled with this control's data when the form is submitted and/or the parameter in the <SelectCommand> which will supply this control's data when the form is loaded. This attribute is required if the control will participate in operations with your form's data commands.

  • Nullable: If True, the control will return a DBNull value if the control is blank or contains just whitespace. If a DBNull value is passed to the control, the control will be set to an empty string. Note: Different HTML editors may function differently. XMod Pro will set/read the StringValue property on the underlying editor provider. What the individual editor does with that is up to the editor.