New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Max Content Length

  • Show/Hide Border
  • Table Properties
  • Delete Table
  • Row
    • Insert Row Above
    • Insert Row Below
    • Delete Row
  • Column
    • Insert Column to the Left
    • Insert Column to the Right
    • Delete Column
  • Cell
    • Merge Cells Horizontally
    • Merge Cells Vertically
    • Split Cell Horizontally
    • Split Cell Vertically
    • Delete Cell
  • Cell Properties
  • Table Properties
  • Properties...
  • Image Map Editor
  • Properties...
  • OpenLink
  • Remove Link
  • Insert Select
  • Cut
  • Copy
  • Paste
  • Paste from Word
  • Paste Plain Text
  • Paste As Html
  • Paste Html
(The text length of the RadEditor control below is restricted to 150 characters.)

RadEditor offers the ability to specify the max characters lenght that will be submitted to the server by setting the MaxTextLength and MaxHtmlLength properties. This is very useful in database scenarios when the max content length of RadEditor should be set to not exceed the specified characters lenght of the database field.
The MaxTextLength property restricts only the text length of the content without checking the HTML markup, while the MaxHtmlLength property restricts the content along with the HTML markup.

Note: In order to not decrease typing, editing and pasting performance both properties check the characters length only when submitting the content.

Related Resources

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="vb" Theme="Default" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb"Inherits="Telerik.Web.Examples.Editor.MaxContentLength.DefaultVB"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
<link href="../Common/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-wide">

        <telerik:RadEditor RenderMode="Lightweight" runat="server" MaxTextLength="150" ID="RadEditor1" SkinID="DefaultSetOfTools" Width="800px">
            <Modules>
                <telerik:EditorModule Name="RadEditorStatistics" Visible="true"></telerik:EditorModule>
            </Modules>
        </telerik:RadEditor>

        <telerik:RadButton RenderMode="Lightweight" ID="Button1" runat="server" Text="Submit"></telerik:RadButton>
        <span>(The text length of the RadEditor control below is restricted to 150 characters.)</span>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance