Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binding Textbox to a Class Property
Message
From
01/06/2004 14:17:42
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00908931
Message ID:
00908984
Views:
21
"I'm still unsure of what the difference between the two is can you elaborate about what is going on? "

Sure. The help file states that the 3rd parameter, the datamember, has to be a property or list to bind to.

In your original example, "street" is a string inside the address class, but isn't a property.

When .NET tries to bind, as some point it reads the datasource (oAddress) and checks for/validates the property/column that you specified in the datamember (street).

If we were using a dataset, the datasource parameter would be the dataset name, and the datamember parameter would be the datatable and column name. Just think of one trying to 'map to' the other.

Since street was neither a prop nor column in the data source, that's what you got the error. And when we changed street to a prop, .NET saw it as a prop and ran fine.

Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform