The following example demonstrates the C1InputNumeric control's numeric range support with the ability to easily change MinValue and MaxValue properties.
To set the numeric values using the Tasks menu:
To set the numeric values using .html markup:
To set the MinValue to 1, the MaxValue to 1000, and the Value to 1, use the following markup in the .aspx page:
To write code in Source View
<cc1:C1InputNumeric ID="C1InputNumeric1" runat="server"
MaxValue="1000"
MinValue="1"
Value="1">
</cc1:C1InputNumeric>
To set the numeric value using code:
To set the numeric value for the C1InputNumeric control, double-click the Web page to create an event handler for the Load event. Enter the following code for the Page_Load event:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
With C1InputNumeric1
.MaxValue = 1000
.MinValue = 1
.Value = 1
End With
|
|
To write code in C#
| C# |
Copy Code
|
|---|---|
this.C1InputNumeric1.MaxValue = 1000; this.C1InputNumeric1.MinValue = 1; this.C1InputNumeric1.Value = 1; |
|
Run the project and observe the following: