This function renders an error message based on a control id and validation error collection. If a validation error is found for the control the error is rendered.
Add this control after the control that it is displaying the error for.
<div class="form-group form-horizontal">
<label class="col-sm-2">Billing Rate:</label>
<div class="col-sm-7">
<%= HtmlTextBox("BillRate",poCustomer.BillRate,[class="form-control"]) %>
<%= HtmlBindingError("BillRate",poErrors) %>
</div>
</div>
If there's an error in the billrate text field unbinding process, or you've explicitly added some validation errors to the error collection, the HtmlBinding error is displayed. If no matching error is found or the error collection is null nothing is rendered.
Here's what a rendered error looks like by default:
o.HtmlBindingError(lcControlId,loErrors,lcMessage,lcAttributes)
Parameters
lcControlId
The ID of the control that this error message relates to.
loErrors or loError
A wwValidationError collection instance or HtmlErrorDisplayConfig instance.
The collection can be created from Request.UnbindFormVars() or wwBusiness.Validate().
lcMessage
Optional - a static method to display. If set this is the message displayed instead of the message on the
lcAttributes
Optional - HTML Attributes to add to the DIV. If empty or you don't include class
attribute, class="error small"
is set as part of the attributes.
See also:
Class wwHtmlHelpers© West Wind Technologies, 1996-2024 • Updated: 10/15/17
Comment or report problem with topic