TextCounterHelper¶
Renders a labeled <textarea> carrying data-start-length/data-max-length attributes that client-side script uses to show a live character count, defaulting to a 4000-character maximum.
Purpose¶
- Renders a labeled
<textarea>carryingdata-start-length/data-max-lengthattributes that client-side script uses to show a live character count, defaulting to a 4000-character maximum.
Context¶
- Namespace:
SAIF.Web.Mvc.UI.Extensions - Assembly/package:
SAIF.Framework.Web.Mvc (source-shipping NuGet package) - Kind: static class
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| TextAreaCounterFor |
public static MvcHtmlString TextAreaCounterFor<TModel, TProperty>(this HtmlHelper<TModel> html, Expression<Func<TModel, TProperty>> expression, string labelText = null, object htmlAttributes = null, int startLength = 0) |
Strongly-typed overload that always applies the 4000-character default maximum (see BR-52). |
| TextAreaCounter(this HtmlHelper, string name, string labelText = null, object htmlAttributes = null, int startLength = 0, int maxLength = 4000) | public static MvcHtmlString TextAreaCounter(this HtmlHelper html, string name, string labelText = null, object htmlAttributes = null, int startLength = 0, int maxLength = 4000) |
Renders the label (or a bare span when no label text resolves) followed by the counted textarea; see the "Render a character-counting textarea" operation. |
Sources¶
src/Web.Mvc/UI/Extensions/TextCounterHelper.cs