VB .NET

We can use isnumeric() to find out whether the text in a textbox contains only numbers.

Here is an example:

{code }If IsNumeric(TextBox2.Text) Then
'Logic if the textbox has only numbers Else
'Logic if the textbox contains alphabets or special characters also

End If{/code}