The DetailsView control helps accelerate web application development. For a recent ASP.NET project, we used it in conjunction with SubSonic to create a rapid prototype.
The data objects generated by SubSonic make it easy to create and configure a DetailsView control.
First, create the necessary controller if needed. Here's the partial class I created for the Share table:
using System.ComponentModel;
namespace CustomerProject.Data
{
public partial class ShareController
{
[DataObjectMethod(DataObjectMethodType.Select, false)]
public ShareCollection FetchByProjectID(object ProjectID)
{
return FetchByQuery(
Share.CreateQuery()
.AddWhere("ProjectID", ProjectID));
}
}
}
Start by dragging a DetailsView onto the design surface

Click on the arrow to the right of the DetailsView. Under Choose Data Source, select <New data source…>

Select Object, and provide a name.

Select the appropriate SubSonic-generated controller.
Choose the Select method.

Define parameters for the Select method

Now you've got a DetailsView on the page.
Use Source view to delete unneeded fields.
Finally, change the default view to Edit, and remove the height and width parameters.
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="sharesDataSource" DefaultMode=Edit>