Moving the new/insert button on DetailsView
I have a GridView and DetailsView on a page, and when I specify
<asp:CommandField ShowEditButton="True" ShowInsertButton="True" ShowDeleteButton="True" /> at the bottom of the DetailsView, I get the 3 normal buttons rendered at the bottom of the DetailsView table it creates.
This seems like poor usability to me. When my user wants to insert a new record, he or she has to first get an existing record into the DetailsView Table, then click on "New". What I would rather have is the "new" button rendered elsewhere on the page, outside the DetailsView and GridView tables. I can see what the DetailsView is creating in the HTML code ... it looks like this:
I could probably just copy this elsewhere on the page, but that is a pretty bad coding practice.
What is the preferred method of creating the button outside the GridView and DetailsView? I tried doing my own <asp:Linkbutton> but either that's not allowed or I don't understand the syntax.