Those who marked this as duplicate please review and answer me ! Because here my scenario is totally different from other ! I'm not having a HTML website! I'm having ASPX web page application! So if I set type="number" or "tel" its not running! Because there is no such attribute in ASPX page tag. I'm using only allowed! So those previous answers for HTML page only I can use type="number" or "tel". Please try in ur local environment. Because try this code <input type="number" runat="server" id="numberonly"/> or <input type="tel" runat="server" id="numberonly"/>
but this will work if we didn't use runat="server" attribute like this
<input type="number" id="numberonly"/>
But I want with runat="server" because I'm taking those parameter to back-end like getting value of field like .value ! So please help me to do this in client side itself.
I have searched a lot of content to show only numeric keyboard, when they call my aspx web page from a android or a iPhone or both... In HTML5 i have the type attribute number to achieve this but my problem is I'm having a mobile site page on ASPX web page.
The code <input type="text" id="txtnumber" value="Numberonly" pattern="[0-9]*" />
Was not working! So i want to define a attribute number so that i can use that on <input type="number"
please can any one help? I already tried type="tel"
also!