I use the FormView control quite a bit, but I'm sorry that I no longer had control over the default templates.
When I drag a FormView from the toolbar onto my page and point it to the DataSource control, it pre-populates ItemTemplate, EditItemTemplate and InsertItemTemplates, but this is not very good.
For example, InsertItemTemplate by default looks like this:
<InsertItemTemplate>
id:
<asp:TextBox ID="IDTextBox" runat="server" Text='<%# Bind("id") %>' />
<br />
Name:
<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
...
</InsertItemTemplate>
But what I would prefer is a nice old fashioned html table
<InsertItemTemplate>
<table>
<tr>
<td>
id:
</td>
<td>
<asp:TextBox ID="IDTextBox" runat="server" Text='<%# Bind("id") %>' />
</td>
<tr>
...
</table>
</insertItemTemplate>
I know that I can use DetailsView to get a visualized table, but I end up modifying the form so much that I prefer to use FormView. I just want Visual Studio to start me a little closer to where I want to end.
, T4 - VS, , .
- ?