views:

10

answers:

0

Hi, guys.

I have two FormView controls on an asp.net page using an EntityDataSource. I'd like to hook the ItemInserted event of the first one, get the identity field of the insert and use that identity in an insert call of the second.

Is this possible? I figured I can get the identity from hooking the Inserted event of the EntityDataSource1 by pulling a reference from its EventArgs. I know I could then do a .FindControl of some form to grab a reference to the second FormView's control for the identity value I'm inserting.

This way doesn't seem optimal. I'm thinking the bound values are probably available directly on the FormViews?

Help with the best way to do this would be greatly appreciated.