473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

ReverseDataBind

DataBind() will move data from my source object into the GUI, but is there a
way to automatically reverse this data flow, or do I need to write code like
this?

MyPerson.Name = NameTextBox.Text;
Thanks

Pete
Apr 5 '06 #1
4 935
The new DataSource controls, with the new data bound controls in ASP.net 2.0
come as close to this as you can get.

"Peter Morris [Droopy eyes software]" wrote:
DataBind() will move data from my source object into the GUI, but is there a
way to automatically reverse this data flow, or do I need to write code like
this?

MyPerson.Name = NameTextBox.Text;
Thanks

Pete

Apr 5 '06 #2
How is it done in dotnet 2?
Apr 5 '06 #3
Well without going into too much detail...

There are some new controls: SQLDataSource, AccessDataSource ,
ObjectDataSource , XMLDataSource and SiteMapDataSource. You can then bind
these to the various new databound controls by simply using the DataSourceID
property. The datasource controls have a number of properties such as
SelectCommand, UpdateCommend etc. that you can set to various SQL queries toi
perform the SELECT, UPDATE, INSERT and DELETE actions you want. That way you
can have a databound control, that keeps it's viewstate and can read, edit,
insert and delete records without actually writing any code at all. Of
course it gets a bit more complex if you want to do anything very usefull
such as validating the users input etc, but it's still much much easier than
ASP.net 1.1

"Peter Morris [Droopy eyes software]" wrote:
How is it done in dotnet 2?

Apr 5 '06 #4
Ah, that's no use to me then. The datasources in my case are object
instances and not datasets or RDBMS tables :-(
Apr 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.