I was building a website for iPhone (WebApp) with asp.net and wanted to use the new html 5 controls. I mean the textboxes that ask you to enter number, telephone or do automatic email validation and more (input type=”email”, input type=”url”, input type=”number”, input type=”tel”, input type=”search”).
But asp.net 3.5 doesn’t have these controls, so I built some of my own.
This is how it works:
You download the binary zip file (CatchyTech.Libs.Binary.zip) and unzip it.
You create a reference from your project to CatchyTechMobile.Libs.dll
Then add to web.config in the <controls> section:
<controls> <add tagprefix="HTML5" namespace="CatchyTechMobile.Libs.HTML5Controls" assembly="CatchyTechMobile.Libs" /> </controls>
In your aspx use:
<HTML5:HtmlInputNumber ID="txtNumber" runat="server" PlaceHolder="Enter number here" />
The available properties:
- PlaceHolder – A string of text to display in the form input when the input is empty.
- AutoCapitalize – A Mobile Safari–specific setting that allows you to turn off the default autocapitalization feature. On (true) by default. Use false to disable.
- AutoCorrect – A Mobile Safari–specific setting that allows you to turn off the default spellcheck feature. On (true) by default. Use false to disable.
- AutoComplete – Setting that allows you to turn off the auto complete feature of Mobile Safari. On (true) by default. Use false to disable.
- CssClass – Set a css class of the control (as regular asp.net textbox).
- ValidationGroup – Set validation group (as regular asp.net textbox).
If you like it, add a comment. If you want more html5 controls, add a comment.
Download binaries here
Download full source and examples here

