ComponentOne Extender Controls for ASP.NET Web Forms
Wijmo Control Toolkit Extender Controls / Input Extenders / C1InputNumberExtender / Formatting Input as Currency
In This Topic
    Formatting Input as Currency
    In This Topic

    The C1InputNumberExtender control allows you to formant input as currency. Set the NumberType property to Currency to take advantage of this feature.

    1. Create an ASP.NET Web application.
    2. Add a standard TextBox control to the main content of  your page.
    3. Click the TextBox smart tag and select Add Extender from the Tasks menu.
    4. In the Extender Wizard, select C1InputNumberExtender and click OK. A C1InputNumberExtender control is added to the page and the TargetControlID is set to TextBox1.
    5. Select View | Properties Window in the Visual Studio menu.
    6. Click the drop-down list at the top of the Properties window and select TextBox1_C1InputNumberExtender.
    7. Set the C1InputNumberExtender.NumberType property to Currency.
    8. Set the C1InputNumberExtender.Value property to 25.5.

    The markup should now look similar to the following:

    <cc1:C1InputNumberExtender ID="TextBox1_C1InputNumberExtender" runat="server" NumberType="Currency" TargetControlID="TextBox1" Value="25.5">

        </cc1:C1InputNumberExtender>

    1. Press F5 to run the application. The text box displays the initial value of 25.5 formatted as $25.50. Enter any numeric value, and it is formatted as currency.