Use MaxHTMLLength or MaxTextLength to Protect Your Database

We often use a database backend such as SQL Server to store data. In such databases, you have to specify the length of any textual field when a table is designed. If you tried to insert a record whose text length is greater than allowed by your table, an error will be reported.

To prevent this type of error from occurring, developers can use MaxHTMLLength or MaxTextLength in the RichTextEditor to limit the length of the user's input.

Demo Code:

     Dim rte
     Set rte=new RichTextEditor