Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Databind Database to Datalist OK, But datalist to Database?


Message #1 by schmidtj@c... on Wed, 5 Dec 2001 14:54:02 -0500
I understand how to bind a database to a datalist control to show all
contents.

But when I want to update the rows in the datalist (because I have
checkboxes for each row) and push to the database is there one simple
command that will give me the new dataset back?

This is essentially the code I need...  does this sort of thing exist?

'I get the data like this and put into datalist control
DataList1.DataSource = MyDataSet.Tables ("MyTable")
DataList1.DataBind

'OK now the questionable part:
'On a button press on the main part of the page can I do something like
this?
MyUpdatedDataset = DataList1.MyDataSet

OR,
do I have to loop through all the items in my datalist on form post and
recreate the dataset one row at a time?

Thanks in advance for your help.

Jenna
schmidtj@c...

  Return to Index