Subject: IStateManager.TrackViewState() Ch 17
Posted By: EdKroket Post Date: 1/25/2007 6:10:10 AM
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:
                ((IStateManager)fields[i]).TrackViewState();
            }
            ((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


Go to topic 55344

Return to index page 53
Return to index page 52
Return to index page 51
Return to index page 50
Return to index page 49
Return to index page 48
Return to index page 47
Return to index page 46
Return to index page 45
Return to index page 44