tags:

views:

151

answers:

2

I had a NUMBER field in an ORACLE Database that is set to 13,2. I want to use the MaskedEdit field in order to mask this.

If I enter 425.25, it produces a 4250000000000.25, instead of moving the 425 over. I'm literally entering 425 pressing the period key and then 25, which moves me into the decimal area of the MaskedEdit. That works great, but I need the main integer to move down and not fill with zeros.

Any ideas?

A: 

It could be a localized version of your software that is misinterpreting the character . (period). Please try a , (comma) in substitution to the period.

Additionally you should check the CultureInfo, which is an important tool to prevent errors like this, you should set it on your Web.Config and every method that accepts it, like MS Code Analysis tells you so. Common methods that accepts a CultureInfo parameter are:

  1. Parse (int.Parse, double.Parse, ...)
  2. ToString (int.ToString, double.ToString, ...)
Jader Dias
I don't know if the period has anything to do with it. This is the MaskedEdit Control within the AJAXControlToolkit. Hitting period simply moved me to the decimal area of the mask, which is fine. But when I click off the actual box, it fills any space with zeros.
jlrolin
A: 

Check your Mask property:

This is not the correct markup, just an example from Ajax Control Toolkit site.

<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"/>
rick schott