Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 639963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:54:02+00:00 2026-05-13T20:54:02+00:00

I have a check box, RequiredFieldValidator and textbox that have editmask extender I want

  • 0

I have a check box, RequiredFieldValidator and textbox that have editmask extender

I want to change the control properties programmatically when I check the check box but the problem that nothing happened when I check it.
I made the control post back and I added triggers.
when put break point and go with code step by step will go through the code but nothing change.

Please see my code and advice me how to solve this problem
Thank you,

 <asp:UpdatePanel ID="UPanelContacts" runat="server">

    <ContentTemplate>
        <asp:Panel ID="PContactsInfo" runat="server" GroupingText="Personal Information"
            BorderStyle="Dotted" Style="position: absolute; top: 103px; left: 221px; height: 468px;
            width: 811px; margin-top: 69px;">
 <asp:TextBox ID="txtHomePhone" runat="server" Style="top: 147px; left: 543px; position: absolute;
                height: 22px; width: 128px" AutoPostBack="True" ></asp:TextBox>
            <cc1:MaskedEditExtender ID="txtHomePhone_MaskedEditExtender" runat="server" CultureAMPMPlaceholder=""
                CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
                CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
                Enabled="True" Mask="(999)999-9999" TargetControlID="txtHomePhone" 
                AutoComplete="False">
            </cc1:MaskedEditExtender>
            <asp:RegularExpressionValidator ID="REV_HomePhone" runat="server" ErrorMessage="Please enter valid Home Phone"
                Style="position: absolute; top: 177px; left: 476px; width: 226px;" 
                Display="Dynamic" ControlToValidate="txtHomePhone"
                ValidationExpression="\d{3}?\d{3}\d{4}"></asp:RegularExpressionValidator>
 <asp:CheckBox ID="chkIntphoneHome" runat="server" Text="Internation Code" Style="position: absolute;
                top: 113px; left: 549px;" AutoPostBack="True" EnableViewState="False" oncheckedchanged="chkIntphoneHome_CheckedChanged" 
                 />

  </asp:Panel>

    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="chkIntphoneHome" 
            EventName="CheckedChanged" />

    </Triggers>
    </asp:UpdatePanel>

Code behind:
……………………………

    protected void chkIntphoneHome_CheckedChanged(object sender, EventArgs e)
    {
        if (chkIntphoneHome.Checked == true)
        {
            txtHomePhone.Enabled = true;

            txtHomePhone.Text = "";
            txtHomePhone_MaskedEditExtender.Mask = "";
            txtHomePhone.MaxLength = 12;
            //REV_HomePhone.ValidationExpression = @"\d{9}|d{10}|d{11}|d{12}";
            REV_HomePhone.ErrorMessage = "Please enter at less 9 numbers";

        }
        else
        {
            txtHomePhone.Text = "";

           REV_HomePhone.ValidationExpression = @"\d{3}?\d{3}\d{4}";
             REV_HomePhone.ErrorMessage="Please enter valid Home Phone";
             txtHomePhone_MaskedEditExtender.Mask = "(999)999-9999";


        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:54:03+00:00Added an answer on May 13, 2026 at 8:54 pm

    The problem from this line:
    txtHomePhone_MaskedEditExtender.Mask = “”;

    I can not have empty mask with MaskedEditExtender.

    Thank you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have update panel that content check box, textbox, 3 DropDownList with CascadingDropDown extender.
I have created a Check box JQuery Plugin, but when i want to get
I have some check box. I want that when I chek some check box
I have a check box that I want to accurately measure so I can
INSERT MODE i have check box in one tr. and another dropdown control in
I have a check box and want to get the very inital value or
I have used check box in gridview . Now i want to validate those
http://img175.imageshack.us/img175/4295/tableissue.png http://img175.imageshack.us/img175/4295/tableissue.png Here's the picture to begin with. I have this check box, that
I have a check box that is disabled that should be showing a tooltip
I have a check box with text next to it. I want to toggle

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.