Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dataset
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00722613
Message ID:
00725869
Views:
14
>So, in my mind that isn't data binding... or is that all you get in web forms? Or, maybe he is doing this cause he is using business objects rather than dropping a SQLConneciton and SQLAdapter objects on the design surface?

Thats all you get with webforms. One way data binding. Its not a limitation of business objects. When the control is rendered, its value will display the value of its datasource. When you post back, the datasource will not be updated with the control's value, as you have seen.

There is one advantage. You can databind to an expression or method:
< % ERROR: # AnyMethodThatReturnsAString(datasource) # % >
What I do to fix it is I iterate through the form that is posted back and I compare the control id's with the datasets column names. If there are any matches, I update the dataset with the form's value. I call this round-trip databinding and it works well. You just have to remember to name your controls the same as your dataset columns.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform