FormFields for ASP.net <formField:radioButtonList ... >

markup results

Linq-to-SQL (using defaults)

<formField:radioButtonList ID="ffrblCategory" 
  runat="server" Title="Category" 
  L2STableName="category" 
  RepeatDirection="Vertical" />




You can specify a few more properties to get more control of the L2S binding; notice the 'Flow' layout specification

Linq-to-SQL (required)

<radioButtonList ID="ffrblUser" runat="server" 
  Title="User" Required="true" 
  L2STableName="_user" DataTextField="last_name" 
  SelectedValue="3"DataValueField="_user_id" 
  RepeatLayout="Flow" />

It can still be used with normal DataSources as well

SqlDataSource

<formField:radioButtonList ID="ffrblSDS" 
  runat="server" Title="Category" 
  DataSourceID="sds" />

© 2010 Stan Naspinski