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

    The C1InputNumberExtender control allows you to formant input as a percentage. Set the NumberType property to Percent 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 Percent.
    8. Set the C1InputNumberExtender.Value property to 50.
    9. Set the C1InputNumberExtender.DecimalPlaces property to 4.
    10. Set the C1InputExtenderBase.ShowSpinner property to True.

    The markup should now look similar to the following:

    <cc1:C1InputNumberExtender ID="TextBox1_C1InputNumberExtender" runat="server"

            DecimalPlaces="4" NumberType="Percent" ShowSpinner="True"

            TargetControlID="TextBox1" Value="50">

        </cc1:C1InputNumberExtender>

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