ASP.NET 4.5 TextBox TextMode Property

  • Home
  • Blog
  • ASP.NET 4.5 TextBox TextMode Property

Right now everybody is talking about HTML5 and its contains lots of new features like web sockets, canvas, new intput types with validation etc. With HTML5 new input types is going to be one of coolest feature and in future more and more people are going to use that feature. So in asp.net 4.5 asp.net development team given a support via TextMode property enhancements. In earlier versions of ASP.NET we used have only three properties for TextMode property of asp.net textbox control.

  1. MultiLine- for multiline textbox.
  2. Password- for password textbox
  3. SignleLine –for single line textbox

With ASP.NET 4.5 you are going to have tons of options with TextMode property.

  1. Color- for Color entries
  2. Date-  for date entries. You can enter dates only
  3. DateTime – for datetime entries with respect to local time zone.
  4. DateTimeLocal- for datetime entries with respect to local time zone.
  5. Email- for email address
  6. Month- for month and year entry.
  7. Number- for  entering numeric values.
  8. Range- for containing range between two numbers.
  9. Search- for search field. A search field is like regular text fields
  10. Tel- for telephone number.
  11. Url- for website url entries. It will only contain urls.
  12. Week- for entering weeks and year.

Let’s try some examples for new asp.net 4.5 textbox HTML5 features. Here how its look when we set TextMode property as date.

Here is the how it looks when we set TextMode property as color.

Here’s it looks when we set TextMode property as month.

That’s it hope you like it. Stay tuned for more..