Simple FreeTextBox Demo

This demo illustrates the default user interface of FreeTextBox. The marked up text entered by the user is accessible on postback through the Text property; the HtmlStrippedText property returns the text, sans the HTML markup.



HTML Markup (via the Text Property)

HTML Stripped Text (via the HtmlStrippedText property)


Source Code

<%@ Page ValidateRequest="False" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>

<script language="VB" runat="server">
  Sub btnSave_Click(sender as Object, e as EventArgs)
     lblText.Text = FreeTextBox1.Text.Replace("<", "<")
     lblHtmlStrippedText.Text = FreeTextBox1.HtmlStrippedText
  End Sub
</script>

<form runat="server">
   <FTB:FreeTextBox id="FreeTextBox1" runat="server" />
   <br />
   <asp:Button runat="server" id="btnSave" Text="Save" OnClick="btnSave_Click" />
   <p>
   <b>HTML Markup (via the <code>Text</code> Property)</b><br />
   <pre><asp:Label runat="server" id="lblText" /></pre>
   <p>
   <b>HTML Stripped Text (via the <code>HtmlStrippedText</code> property)</b><br />
   <pre><asp:Label runat="server" id="lblHtmlStrippedText" /></pre>
</form>

[Return to the article...]