[Mono-bugs] [Bug 443100] New: TemplateField incorrectly reconstructed from ViewState

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Nov 7 23:30:31 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=443100


           Summary: TemplateField incorrectly reconstructed from ViewState
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: x86
        OS/Version: RHEL 5
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: zaltar at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development


Created an attachment (id=250841)
 --> (https://bugzilla.novell.com/attachment.cgi?id=250841)
Code used to reproduce the bug.

On PostBack, the GridView is recreating TemplateField objects that were
previously added but is not recreating the ItemTemplate associated with them. 
This causes those columns to not display properly on postback.  The only
workaround is to disable viewstate for the GridView.  

Under the MS .Net runtime (tested on 2.0 and 3.5), the GridView is properly
displayed on postback.  Under Mono 2.0 and 2.0.1, the GridView works the first
time, but fails to display the TemplateField column on any postback.

The attached code demonstrates this problem.  The first load of the Bug.aspx
page will display the TemplateField properly.  If the "Postback" button is hit,
simulating a postback, the TemplateField will no longer display anything.  

Overriding TemplateField and logging on the constructor I was able to determine
that Mono uses reflection to recreate the TemplateField on postback overriding
the one that is set in OnInit where as .Net does not.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list