views:

492

answers:

1

Is it possible to display the mask for a MaskedEditExtender in a TextBox as (without the underlines)

(   )   -

instead of

(   )___-____
+2  A: 

I think the PromptCharacter attribute is what you are looking for. Sample taken from the Ajax Control Toolkit homepage, with attribute added.

<ajaxToolkit:MaskedEditExtender
TargetControlID="TextBox2" 
Mask="9,999,999.99"
MessageValidatorTip="true" 
OnFocusCssClass="MaskedEditFocus" 
OnInvalidCssClass="MaskedEditError"
MaskType="Number" 
InputDirection="RightToLeft" 
AcceptNegative="Left" 
DisplayMoney="Left"
ErrorTooltipEnabled="True"
PromptCharacter=" "/>

Check here, expand MaskedEditExtender Properties.

Matthew Jones
Thank you sir. That was it.
Xaisoft
Hai mathews i want dd/mm/yyyy instead of __/__/____
Pandiya Chendur