At first I tell you what I will do:

1. Load data from DB
2. Fill System.Web.UI.WebControls.TextBox with data from DB
3. Than the user can change some data in the System.Web.UI.WebControls.TextBox

and now how I can compare what the user change?

should I add a new Item to Context.Items and compare it after changes?

any idea?



Compare the data where... if in the client side, while loading the page itself you need to put the initial value in some javascript variable or hidden control. If in the server side, you can actually put the data in a whole lot of places. ViewState, Session, Cache etc.. are some of the places (viewstate is better in that you can even put your dataset itself without costing the server memory)....

Or depending on how you retrieved the data from the DB, asp.net will still have the disconnected original data (i.e. dataset, datatable, datagrid) and you could then compare to the "changed" data to the original.

Or, you could place the data from the DB into an array (when you originally obtain the data) and simple compare the data to changed data.

Hope this helps!