Ajax Control Toolkit
ValidatorCallout Demonstration
Name:
Phone Number:



ValidatorCallout Description

ValidatorCallout is an ASP.NET AJAX extender that enhances the functionality of existing ASP.NET validators. To use this control, add an input field and a validator control as you normally would. Then add the ValidatorCallout and set its TargetControlID property to reference the validator control.

ValidatorCallout Properties

The control above is initialized with this code. The italic properties are optional:

<ajaxToolkit:ValidatorCalloutExtender 
    runat="Server"
    ID="PNReqE"
    TargetControlID="PNReq" 
    Width="350px"
    HighlightCssClass="highlight" 
    WarningIconImageUrl="warning.gif"
    CloseImageUrl="close.gif" />
  • TargetControlID - The ID of the Validator to extend
  • Width - The width of the callout
  • HighlightCssClass - A CssClass to apply to the invalid field
  • WarningIconImageUrl - The path to a custom warning icon image
  • CloseImageUrl - The path to a custom close image
  • Animations - Generic animations for the ValidatorCallout extender. See the Using Animations walkthrough and Animation Reference for more details.
    • OnShow - The OnShow animation will be played each time the validation popup is displayed. The popup will be positioned correctly but hidden. The animation can use <HideAction Visible="true" /> to display the popup along with any other visual effects.
    • OnHide - The OnHide animation will be played each time the validation popup is hidden.
ValidatorCallout Known Issues

The callouts do not currently display automatically after a server post-back and will only work for custom validators which utilize client-side validation. Even after a post-back the callout will display when the form is re-validated when a postback is attempted again.

Copyright © 2006-2007 Microsoft Corporation. All Rights Reserved.