FormFields for ASP.net <formField:textBox ... />

markup results

Basic (Required)

<formField:textBox ID="fftbFirst" runat="server"
  Title="First Name" Required="true" />

Simple implementation of Regular Expressions, this example also uses a password TextMode

Regular Expression (Required)

<formField:textBox ID="fftbRegEx" runat="server" 
  Title="Password (8 characters)" 
  Required="true" RegEx="^.{8}.*$" 
  ErrorMessage="too short" />

The following few are just default implementations of the Regular Expression approach above

Email

<formField:textBox ID="fftbEmail" runat="server" 
  Title="Email" Type="Email" />

Social Security Number

<formField:textBox ID="fftbSSN" runat="server" 
  Title="SSN" Type="SocialSecurityNumber" />

Notice that the SSN implementation also uses the AjaxControlToolkit's MaskedEditExtender; or make your own mask:

Mask

<formField:textBox ID="fftbMask" runat="server" 
  Title="3 Numbers - 2 Letters" Mask="999-LL" />

Multiline (Required)

<formField:textBox ID="fftbSummary" 
  runat="server" Title="Summary" 
  TextMode="multiline" Required="true" />

All sorts of stuff going on in Date implementation

Date

<formField:textBox ID="effDate" runat="server" 
  Title="Birthday" Type="Date" />

© 2012 Stan Naspinski