IStateManager.TrackViewState() Ch 17
Dear Dr. Shahram Khosravi
I bumped my head over this :) In my opinion the source code for chapter 17 ( 793507 ch17\793507 ch17\Code\Code1 ) is missing the trackviewstate invocation on DataControlField when databinding is false in the load viewstate of the control.
snippet:
if (s != null && s.Length == fields.Length)
{
for (int i = 0; i < s.Length; i++)
{
if (s[i] != null)
{
if (fields[i] == null) {
fields[i] = new DataControlField();
// in my opinion is missing:
[u]((IStateManager)fields[i]).TrackViewState();</u>
}
((IStateManager)fields[i]).LoadViewState(s[i]);
}
}
}
I am realy enjoying your book so i thought maybe it can be submitted to the eretta, in that way it could help other people.
Edwin
|