B
B. Chernick
Ok, I'm probably missing something simple but I need to get this running fast.
I'm writing a demo in ASP.Net 2.0. All Adds and Edits are normally done
through a DetailsView. The Detailsview is bound to an ObjectDateSource (very
much like in those demo videos) and when the page is editing a record, it's
passed the primary key as a query string. Very simple. In this case the
primary key is just that, an identity field. When I want to insert a record,
I pass the screen a -1 and that knocks it into Insert mode.
What I need to know is this. Is there any way to discover what the new
primary key of the new record is while still in the editing screen so I can
basically have the screen redirect to itself with the new primary key?
(I've been messing around with various Inserted events and stuff but I
haven't found anything so far.)
I'm writing a demo in ASP.Net 2.0. All Adds and Edits are normally done
through a DetailsView. The Detailsview is bound to an ObjectDateSource (very
much like in those demo videos) and when the page is editing a record, it's
passed the primary key as a query string. Very simple. In this case the
primary key is just that, an identity field. When I want to insert a record,
I pass the screen a -1 and that knocks it into Insert mode.
What I need to know is this. Is there any way to discover what the new
primary key of the new record is while still in the editing screen so I can
basically have the screen redirect to itself with the new primary key?
(I've been messing around with various Inserted events and stuff but I
haven't found anything so far.)