asp.net ajaxcontroltoolkit Validatorcalloutextender Simple Use _ Practical skills

Source: Internet
Author: User
This control is a validation control in ASP.net requiredfieldvalidator, RangeValidator, RegularExpressionValidator, CompareValidator, Customvalidator,validationsummary Error validation information an extended control that is called out
The primary role is to display the unauthenticated information to the user through a prominent layer.
Main properties:
<ajaxtoolkit:validatorcalloutextender id= "ValidatorCalloutExtender1" runat= "Server"
Targetcontrolid= "RequiredFieldValidator1" <!--the validation controls to use with-->
Warningiconimageurl= "Images/warning.gif" <!--the picture path of the error icon displayed in the highlight layer-->
Closeimageurl= "Images/close.gif" <!--the close button picture of the highlighted layer-->
Highlightcssclass= "Err" <!--validation error, the style sheet for the validated control-->
Width= "400px" > <!--the width of the bubble-->
</ajaxToolkit:ValidatorCalloutExtender>

The usage is simple:
Copy Code code as follows:

<asp:textbox id= "Txtweidu" runat= "Server" width= "200px" ></asp:TextBox>
<asp:regularexpressionvalidator id= "RegularExpressionValidator1" runat= "Server" controltovalidate= "Txtweidu" Display= "None" errormessage= "Please enter a number! "Validationexpression=" ^ (-|\+) \d+ (\.\d+) $ "></asp:RegularExpressionValidator>
<!--TargetControlID property to develop a validation control to exhale the reminder information id-->
<cc1:validatorcalloutextender id= "ValidatorCalloutExtender1" runat= "Server" targetcontrolid= " RegularExpressionValidator1 "> </cc1:ValidatorCalloutExtender>

The regular expression in the validation control above is a value that can be entered into a number, including decimals.
Attention:
The validation control's Displsy property is set to: None or the information that validates the control is displayed at the same time. The fonts in the highlighting layer are set in the validation control.
So much ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.