views:

22

answers:

0

Hi people,

I have a Dynamic Data custom page with a child formview that connects to the main formview with a query extender via a controlfilterexpression

As per the first diagram: http://msdn.microsoft.com/en-us/library/dd985039(VS.100).aspx#

I've hooked the ItemInserted event and would like to call an insert on the child using the identity from the insert of the main.

Question 1: How do I get the new identity?

Question 2: How do I specify the new identity for the child insert?


The below throws an error because no key is given.

    protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {

        FormView2.InsertItem(true);
    }

Thanks for help,

Carl