Retrieve Newly Inserted ID with Entity Bound to ASP.net FormView

Posts   
 
    
Posts: 24
Joined: 19-Feb-2007
# Posted on: 23-Feb-2007 22:33:48   

Hello,

I understand how to retrieve a newly inserted ID after calling the save() method, but what if you have no save method because your datasouce is bound to a FormView in the ASPX page ?

C#, SQL2000, LLBL2.0.0.0

Thanks !

OO Noob

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 24-Feb-2007 21:39:52   

I understand how to retrieve a newly inserted ID after calling the save() method, but what if you have no save method because your datasouce is bound to a FormView in the ASPX page ?

What LLBLGen Scenario are you using (Adapter o SS)? Are you using LLBLGenProDataSourceControl? If you are using LLBLGenProDataSourceControl, Did you set the flag **Refetch **to true? What's the value of **EncableViewState **property of FormView?

David

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 25-Feb-2007 14:27:48   

Here's an example. It's a bit tricky but doable: http://www.llblgen.com/tinyforum/GotoMessage.aspx?MessageID=47707&ThreadID=8529

We'll address this in v2.1 with an event.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 24
Joined: 19-Feb-2007
# Posted on: 26-Feb-2007 18:02:14   

I'm using SS(LLBLGenProDataSourceControl),I will look at "set the flag Refetch to true, and the value of EncableViewState property of FormView" also will check out Otis's example.

Thanks ! Eric