Click or drag to resize
KaxEditorContent Property
Gets or sets the text content of the KaxEditor control inlcuding the HTML markup.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public string Content { get; set; }

Property Value

Type: String
The text content of the KaxEditor control including the HTML markup. The default is string.Empty.
Remarks

The text returned by this property contains HTML markup. If only the text is needed use the Text property.

You can also set the text content of the KaxEditor inline between the <Content></Content> tags. In this case setting this property in the code behind will override the inline content.

Examples
This example demonstrates how to set the content of the KaxEditor inline and the differences between the Content and Text

<kaxe:KaxEditor id="KaxEditor1" runat="server" >
<Content>
Kettic KaxEditor<br>
the best <span style="COLOR: red">html editor</span> in the world
</Content>
</kaxe:KaxEditor>
<asp:button id="btnSave" runat="server" text="Submit" onclick="btnSave_Click" /><br />
Content:<asp:label runat="server" id="LabelContent"></asp:label><br />
Text:<asp:label runat="server" id="LabelText"></asp:label><br />

[New Example]
Private Sub btnSave_Click(sender As Object, e As System.EventArgs)
    'HtmlEncode the content of the editor to display the HTML tags
    LabelContent.Text = Server.HtmlEncode(KaxEditor1.Content);
    LabelText.Text = Server.HtmlEncode(KaxEditor1.Text);
End Sub
[New Example]
private void btnSave_Click(object sender, System.EventArgs e)
{
    //HtmlEncode the content of the editor to display the HTML tags
    LabelContent.Text = Server.HtmlEncode(KaxEditor1.Content);
    LabelText.Text = Server.HtmlEncode(KaxEditor1.Text);
}
See Also