DetailsView - When do you get the new record value after an insert??

  • Thread starter Thread starter MU
  • Start date Start date
M

MU

Hello,

I have a DetailsView on my form and I have a CheckBoxList that the
user can use in Insert mode. I need to take the values that were
selected from the CheckBoxList and insert them into another table
along with the NEW record id that is generated from the Insert from
the DetailsView.

When do I have access to that new record id and also still have access
to the CheckBoxList that is on the form?

Thoughts? Thanks!
 
Hi Michael,

A detailview is a web control not a form control, what do I understand
wrong?

Cor
 
Hi Michael,

A detailview is a web control not a form control, what do I understand
wrong?

Cor

Sorry, I am using a DetailsView control and would like to get the ID
of the new record that is inserted into the database and am not sure
how.
 
Mu,

In strongly depends what kind ID is used.

If that is by instance a Global Unique ID then you have to create that
yourself first before you do an insert.

Is it an so called Auto ID then you do send nothing (in a datatable is by
instance created a pseudo ID) and you have to get the ID by instance using

SCOPE_IDENTITY
http://msdn.microsoft.com/en-us/library/ks9f57t0.aspx

Cor

Hi Michael,

A detailview is a web control not a form control, what do I understand
wrong?

Cor

Sorry, I am using a DetailsView control and would like to get the ID
of the new record that is inserted into the database and am not sure
how.
 
Back
Top