MaskedTextBox
is essentially an extender that attaches to a
TextBox
control to restrict the kind of text that can be entered. If you are referring to a
AJAXControlToolkit
MaskEditExtender
control, then you have to set the
TargetControlID
pointing to the actual
TextBox
that you want to apply the mask. For example:
<cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TextBox1" .../>
You can then use the
.Text
property of
TextBox1
to get the actual value being masked.
string theValue = TextBox1.Text;
More info, see:
AJAX Control ToolKit Masked Edit Tutorial Example in ASP.NET C# - Ajax Tutorials, Tricks, and Code Examples[
^]