View Single Post
  #3 (permalink)  
Old July 5th, 2009, 04:20 AM
nitis nitis is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you so much for your suggestion.

Fix in ASP
<asp:objectDataSource ID="ODS1" runat="server" InsertMethod="InsertSomething" SelectMethod="GetSomething"
OnItemInserted="ODS1_ItemInserted">

Fix in Code Behide
protectedvoid ODS1_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.ReturnValue != null)
{
ViewState[
"ID"] = e.ReturnValue.ToString();
...
...
}
}

Last edited by nitis : July 5th, 2009 at 04:36 AM.
Reply With Quote