ASP.net, Ajax, JavaScript help

I need help in how to set webform control proprieties in asp.net and ajax control using javascript. I have asp page that has checkBox, TextBox, MaskedEditExtender, and RegularExpressionValidator.I set the mask for MaskedEditExtender as Mask=”(999)999-9999″ and I set the ValidationExpression for RegularExpressionValidator as ValidationExpression=”d10”.I want to change these two properties when user …

via Asp.Net Developed Tutorials » Search Results » ajax:

ASP.net, Ajax, JavaScript help

I need help in how to set webform control proprieties in asp.net and ajax control using javascript.
I have asp page that has checkBox, TextBox, MaskedEditExtender, and RegularExpressionValidator.
I set the mask for MaskedEditExtender as Mask=”(999)999-9999″ and I set the ValidationExpression for RegularExpressionValidator as ValidationExpression=”d10”.
I want to change these two properties when user checked the international checkbox to: Mask=”999999999999″ and as ValidationExpression=”d12” Using JavaScript without interrupting with server side and when the user unchecked they get previous value so the interaction should be only in the client side.
Please help me with this and here is my code:




AutoPostBack=”false”/>

AutoComplete=”False” CultureAMPMPlaceholder=””
CultureCurrencySymbolPlaceholder=”” CultureDateFormat=””
CultureDatePlaceholder=”” CultureDecimalPlaceholder=””
CultureThousandsPlaceholder=”” CultureTimePlaceholder=”” Enabled=”True”
Mask=”(999)999-9999″ TargetControlID=”txtHomePhone”>

ErrorMessage=”RegularExpressionValidator” ControlToValidate=”txtHomePhone”
ValidationExpression=”d10”>



……………………………….

Instead of meddling with the maskEditor/validator controls’ client-side behaviour, are you OK with having 2 sets of textbox+maskExtender+validator?
Set 1 = texbox_HomePhone + maskEditExtender_HomePhone + regexValidator_HomePhone
Set 2 = texbox_IntHomePhone + maskEditExtender_IntHomePhone + regexValidator_IntHomePhone
Using the checkbox to toggle (via javascript) the display/hidding of either set.

For more info: ASP.net, Ajax, JavaScript help

Asp.Net Developed Tutorials » Search Results » ajax

ASP.net, Ajax, JavaScript help

Share this post:

Related Posts

Leave a Comment