Numeric Property

Indicates whether the input must be fully numeric. The default is false.

public bool Numeric {
   get,
   set
}

Remarks

Not all markup languages support the use of fully numeric user input. HTML, for example, does not support this property.

Example

The following example demonstrates how to use the Numeric property to specify that the input to the TextBox control must be numeric.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    TextBox1.Numeric = true
End Sub

[C#]

void Page_Load(object sender, EventArgs e)
{
'   TextBox1.Numeric = true; 
}  

See Also

Applies to: TextBox Class