How to use the SharePoint Web Controls – Update
My post How to use the SharePoint Web Controls has been updated.
It now shows how to use a generic control for each SPField, instead of picking the corresponding SharePoint Web Control.
1: BaseFieldControl webControl = field.FieldRenderingControl;
<span class=lnum> 2: </span>webControl.ListId = list.ID;
3: webControl.ItemId = item.ID;
<span class=lnum> 4: </span>webControl.FieldName = field.Title;
5: webControl.ID = GetControlID(field);
<span class=lnum> 6: </span>webControl.ControlMode = mode;
Thanks for all the great comments and ideas!