TextBox Digit Or Numeric Only In VB.Net
Know More :
ASP.Net VB.Net
C#.Net
Sliverlight
XML
WPF
WCF
Ajax
Let’s start in Visual Studio 2010 , Create a new project and name it “Textbox digit only”. After this, drag textbox from toolbox on the form1 also drag label name it mobile no. As shown in figure do this..
Copy and paste code on textbox keypress event..
If (e.KeyChar < "0" OrElse e.KeyChar > "9") Then
If (e.KeyChar <> Microsoft.VisualBasic.ChrW(8) AndAlso e.KeyChar <> "DEL") Then
e.Handled = True
MessageBox.Show("Enter digit only.", "Sujay Application", MessageBoxButtons.OK)
End If
End If
You Can also Convert VB.Net To C# , Python, Ruby

Now press F5 button or select debug from debug menu.Thanks.
Know More :
ASP.Net VB.Net
C#.Net
Sliverlight
XML
WPF
WCF
Ajax
Let’s start in Visual Studio 2010 , Create a new project and name it “Textbox digit only”. After this, drag textbox from toolbox on the form1 also drag label name it mobile no. As shown in figure do this..
Copy and paste code on textbox keypress event..
If (e.KeyChar < "0" OrElse e.KeyChar > "9") Then
If (e.KeyChar <> Microsoft.VisualBasic.ChrW(8) AndAlso e.KeyChar <> "DEL") Then
e.Handled = True
MessageBox.Show("Enter digit only.", "Sujay Application", MessageBoxButtons.OK)
End If
End If
You Can also Convert VB.Net To C# , Python, Ruby
Now press F5 button or select debug from debug menu.Thanks.
Know More :
Post Comment
No comments