Hi,
Using SqlDataSource, I can set the InsertParamater direction to output and retrieve the ID of the record that is just added. (see snippet below)
Could any one please kindly show me how can I achieve this using llblgendatasource2?
Thanks,
Snippet:
<asp:SqlDataSource ... OnInserted=”SqlDataSource1_Inserted”>
<InsertParameters>
...
<asp
arameter Direction=Output Name=”NewId” Size=4 Type=Int16 />
</InsertParameters>
</asp:SqlDataSource>
...
protected void SqlDataSource1_Inserted(object sender, SqlDataSourceStatusEventArgs e)
{
object newId = e.Command.Parameters[“@NewId”].Value;
...
}