—-> I have datatable which is passing to another page in session variable.
—-> Now on another page i take the session variable into datatable.
datatable ds_table = new datatable();
ds_table = (datatable)session["table_value"];
—-> so problem, is that , when i filtering some rows from ds_table . that taking effect in the session variable. if some rows deleted from ds_table. then it is also deleted from session variable.
—-> so, anyone tell me why is this going to happene?
help me. its necessary.
I would suggest that you copy the datatable before placing it in session. Then, it won’t be affected by any changes you make later to the original datatable.
All you have to do is declare a new DataTable variable and copy it:
Then you can put
copyDataTableinto session.