Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bound controls
Message
From
07/07/2004 17:35:51
 
 
To
07/07/2004 17:29:56
General information
Forum:
ASP.NET
Category:
Forms
Title:
Miscellaneous
Thread ID:
00921632
Message ID:
00921639
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform