Wednesday, March 21, 2012

How can I use a email regular expression in Ajax Toolkit

Hi I am developing an application using the validations of AJAX Toolkit. In one screen i make the user input the email address. I want to have a regular expression which will validate the input done by user. How can i add a regular expression in Ajax Toolkit.

Early response will be appreciated.

Praveen Mishra

drag a regularexpression validator on your form & set its controltovalidate property and regularexpression property. The client side validations will trigger before the partial postback.

Cheers

Vishal Khanna

(pls mark as answer if reply helps)


See the last bullet on this page:http://blogs.visoftinc.com/archive/2007/09/23/asp.net-ajax--updatepanel-not-working--common-problems.aspx about using validators with an UpdatePanel (assuming this is what you mean by the "Ajax Toolkit")

To use the the ValidatorCallout with your RegularExpressionValidator, seehttp://www.asp.net/AJAX/AjaxControlToolkit/Samples/ValidatorCallout/ValidatorCallout.aspx

-Damien


You have to set ValidationExpression Property of RegularExpressionValidator.control

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.regularexpressionvalidator.validationexpression.aspx

No comments:

Post a Comment