Hello All I was asked to put together a quick and dirty data input page. It took me 10 minutes to wire it up and an hour to find the solution, so I am passing it on.
The SQLDataControl is a pretty neat component, but you have to know it's little problems. One I found was it's inability to auto generate an output parameter. It needed to be coded by hand.
I wanted to use a DetailsView, connected to a SqlDataSource that would call a Stored Procedure to insert a record and retrieve the Identity of the last inserted record. After researching the subject, I decided to use IDENT_CURRENT('tablename') and not @@Identity.