Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop down doesn't reset when dataset changes
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows 2000
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01144228
Message ID:
01144718
Vues:
14
Linda,

>I have a drop down list on a web form that is bound to a business object. It was working correctly until I added a new item to the list with a blank display value and 0 as the control value. I did that in an override of the form's OnPreRender method, also setting the control's initial value to 0. Now when I pull up a record, the drop down value remains 0. Do I need to set the drop down list programmatically? Shouldn't that set once I get a new dataset?

I'm guessing your code in the OnPreRender() method is always getting fired. You may want to check a condition (possibly a session variable) to determine whether or not to set the initial value to zero.

Best 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