I need help to restrict my textbox to accept just numbers. I have another textbox event textchanged and in that condition I want to not allow user to write other characters than numbers. have implemented the maxlength but I can't validate to accpet just numbers. here is my condition that I want to implement in:
Protected Sub txtIdType_TextChanged(sender As Object, e As EventArgs)
Dim txtb As TextBox = CType(FormViewPerson.FindControl("txtIdType"), TextBox)
Dim txtb1 As TextBox = CType(FormViewPerson.FindControl("TextBoxIDCode"), TextBox)
If (txtb.Text = "Leternjoftimi" OrElse txtb.Text = "KosovoIDCard" OrElse txtb.Text = "Licna karta") Then
txtb1.MaxLength = 10
End If
End Sub