Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data binding not working
Message
De
24/08/2011 08:31:37
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2003
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01521648
Message ID:
01521689
Vues:
44
Hi Linda,

>I am working on a web application after several years away from the web, so for all practical purposes, I am a newbie. I have set up my form with the default settings, as described in the JumpStart. Perhaps I don't understand how this was meant to work but I expected that, unless I specifically issued a save, there would not be a postback. I am getting a postback for each data field and, worse yet, the value entered in the control is not sticking, although values that I enter programmatically are sticking. I have checked, double-checked, triple-checked, etc. to make sure that I have the BindingSource and BindingSourceMember set correctly. The value isn't even showing up in the dataset when I check it in the TextChanged event.
>
>I'm probably missing something obvious but can't see any difference between what I have and what's in the jumpstart. Any ideas for where to start looking? Thanks.

Since the web stuff is static and once the page is loaded the business objects and everything else goes away. Are you instantiating your business objects in the Page Load event so they get done every time? Are you re-retrieving data every time the page posts back? What I often do depending on what is the data; I will save a copy of the DataSet in a session variable. Check out the jump start for Web Forms Step 12 for the Order Edit Form. The data is retrieved and saved in a session for the order and detail but the Shippers and Employees are retrieved every time a post back occurs. This should give you some ideas on what you may want to do.

I am not sure I follow the Post Back for each data field however. Are you saying you get a seperate post back for each field that is saved even when you only initiate a single save?

Welcome back to the web. It is some of the more frustrating work I have done due to the static nature and difficult to control positioning. Are you sure you don't want to be doing Silverlight? :-) Or maybe you are.
Timothy
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform