We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

MaskEditTextbox

Thread ID:

Created:

Updated:

Platform:

Replies:

98090 Feb 2,2011 03:01 PM Feb 4,2011 02:53 AM ASP.NET Web Forms (Classic) 1
loading
Tags: Tools
corinne
Asked On February 2, 2011 03:01 PM

Can i use the MaskEditText box to valid domestic phone numbers as well as international numbers?


Varalakshmi R.S [Syncfusion]
Replied On February 4, 2011 02:53 AM

Hi Corinne,

Thank you for your interest in Syncfusion products.

Yes, the MaskEditText box can be used to validate domestic phone numbers as well as international numbers. Please refer the below code snippet to achieve this,


[ASPX]
Choose type:
onselectedindexchanged="RadioButtonList1_SelectedIndexChanged">
International
Domestic



[C#]
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
MaskedEditTextBox1.Value = "";
string s=RadioButtonList1.Text;
if (s == "International")
{
MaskedEditTextBox1.Mask = "(###) ###-####-####";
}
else
{
MaskedEditTextBox1.Mask = "C## #### ####";
}
}


Kindly let us know your concerns.

Regards,
Varalakshmi.R.S




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;