- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Render ASP.NET TextBox as HTML5 Input type “Number”
To render ASP.NET TextBox as HTML5 input type “Number”, set type="number" directly on the textbox.
Let us see an example of ASP.NET TextBox −
<asp:TextBox runat="server" type="number" />
You can also use the following dynamically created the control −
TextBox tb = new TextBox(); tb.Attributes.Add("Type", "number");
Advertisements