MultiLineTextBoxValidator
The MultiLineTextBoxValidator is a validator control which will restrict the length of MultiLine TextBox controls.
Features
- All actions can be performed either server side with postbacks or client side without postbacks.
- Restrict length of TEXTAREAs using JavaScript.
- Use JavaScript alert popups if input exceeds maxlength property.
- Provide user feedback with a character remaining counter.
Code Example
<%@ Register TagPrefix="fluent" Namespace="Fluent.MultiLineTextBoxValidator" Assembly="Fluent.MultiLineTextBoxValidator" %>
Message:<br/>
<asp:TextBox id="TestTextBox" Runat="server"
Rows="10"
Columns="50"
TextMode="MultiLine" />
<br/>
<fluent:MultiLineTextBoxValidator Runat="server"
ControlToValidate="TestTextBox"
MaxLength="10"
OutputControl="TestTextBox2"
ErrorMessage="Too long!"
ShowJavascriptAlert="True"
EnableClientSideRestriction="True"
ShowCharacterCount="True" />
<br/><br/>
<asp:TextBox id="TestTextBox2" Runat="server" /> characters remaining
<br/><br/><br/>
<asp:Button Runat="server" Text="Submit" />
Copyright © 2002-2003 Fluent Consulting. All rights reserved.