I have a custom control which uses System.Windows.Form.Textbox
as the underlying text box.
I want to change that type to type="number"
however I don't see a way to do this.
The end goal is to have an input field which, when clicked on a smartphone browser, will give you only numeric keys to enter rather than the full keyboard.
It is possible to restrict the input to numbers only using JavaScript
, but that is not what I want. I specifically need the keyboard to open with only numbers on it. If there is an alternative way to achieve this than setting type="number"
then that should work as well.