Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bound controls
Message
De
07/07/2004 17:35:51
 
 
À
07/07/2004 17:29:56
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Divers
Thread ID:
00921632
Message ID:
00921639
Vues:
21
This message has been marked as the solution to the initial question of the thread.
Yep, you can bind to a property ... but make sure it's a public *property* (with a get/set) and not simply a field (public or otherwise).
MyTextBox.DataBindings.Add("Text", this, "MyProperty");
~~Bonnie


>Learning how to bind controls to objects is giving me fits. It seems that you can only bind a control to an Array (or other collection using the IList interface), or a DataSet (and DataTable, I suppose).
>
>What if I want to bind textBox.text to a property of a form, or a member of some other class. Can that be done?
>
>Thanks again,
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform