ComponentOne Input for ASP.NET AJAX: Input for ASP.NET AJAX Task-Based Help > C1NumericInput Tasks > Enabling the Thousands Separator

Enabling the Thousands Separator

The following example shows how you can easily enable the thousands separator for the C1NumericInput control.

To enable the thousands separator using the Tasks menu:

1.   Open the C1NumericInput Tasks menu.

2.   Set the Value of the control to 1000.

3.   Select the ThousandsSeparator checkbox in the Tasks menu.

To enable the thousands separator using .html markup:

To enable the ThousandsSeparator and set the Value to 1000, use the following markup in the .aspx page:

 

<cc1:C1NumericInput ID="C1NumericInput1" runat="server"

ThousandsSeparator="True"

Value="1000">

</cc1:C1NumericInput>

To enable the thousands separator using code:

To enable the thousands separator for the C1NumericInput control, double-click the Web page to create an event handler for the Load event. Enter the following code for the Page_Load event:

      Visual Basic

' Set the numeric value

Me.C1NumericInput1.Value = 1000

' Enable the thousands separator

Me.C1NumericInput1.ThousandsSeparator = True

      C#

// Set the numeric value

this.C1NumericInput1.Value = 1000;

// Enable the thousands separator

this.C1NumericInput1.ThousandsSeparator = true;


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.