Author: jamesfreddyc | Posted on: 3/10/2010 2:33:22 PM | Views : 444

I'm a little confused here.  In the code-behind of an ASP.NET page, I have a private DataTable that I set on the PageLoad event, which I use to populate controls on the page.  However, it seems to get lost (set to Nothing) after the load event.
Is this normal?
How do I hold onto a DataTable object after the page loads? 
This is also very confusing as to how I am supposed to submit updates to the SQLServer db when any changes are mande to that datatable.  I mean:
1. PageLoad, set DataTable, set controls values to corresponding columns in Datatable.
2. User changes a textbox value, then start a .BeginEdit(), DataRow("Field) = txtboxvalue.
3. Update button clicked should submit DataTable to Webservice that references a DAL that accepts the DataTable for db update.
...

Go to the complete details ...