Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save is not saving...
Message
 
À
29/03/2004 14:52:37
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00890567
Message ID:
00890631
Vues:
19
>When I try to save changes from a detail screen, everything SEEMS to go fine, but when I reload the page, my changes are gone.
>
>Here's the code that should do it -- what might I be missing here?
>
>
>DataSet dsPermit = (DataSet)Session["dsPermit"];
>
>   if (this.Save(this.oPermit, dsPermit, this.oPermit.TableName) != mmSaveDataResult.RulesPassed)	
>   {
>	Response.Write("<script language=JavaScript>Alert('Changes could not be saved'))</script>");
>	
>   }
>
When you execute the call to this.Save() shown above, the business object raises a "Saving" event, to which all user interface controls which are bound to the business object respond (by storing their values to the business object's data). Is it possible that you are not registering the business object with the form in the Load handler of the page? (Make sure it's happening when IsPostBack is true). If this is the case, user interface controls never register with business objects on postback and the values never get written back to the business object.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform