[Mono-bugs] [Bug 470993] New: ASP.NET ignore EnableViewState property on component

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 30 09:46:00 EST 2009


           Summary: ASP.NET ignore EnableViewState property on component
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: informatique.internet at fiducial.fr
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:
Gecko/2008120121 Firefox/3.0.5

Component are saved in viewstate even if EnableViewState=false on Controls (not
on the page)

Reproducible: Always

Steps to Reproduce:
1.try this aspx :
<%@ Page Language="C#" Inherits="testweb.Test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <form id="form1" runat="server">
        <asp:Label id="lbl1" runat="server"
        <asp:Button  runat="server" Text="PostBack me"></asp:Button>

and aspx.cs

sing System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace testweb

    public partial class Test : System.Web.UI.Page
        protected Label lbl1;

        protected override void OnLoad (System.EventArgs e)
            Console.WriteLine("Viewstate enabled for lbl1

            if (!IsPostBack) {
                Console.WriteLine("Not postback");
            else {
                Console.WriteLine("lbl1.Text "+lbl1.Text);


2. Compile it and run xsp
3. Click on PostBack me
Actual Results:  
Viewstate enabled for lbl1 ?False
Not postback
Viewstate enabled for lbl1 ?False
lbl1.Text coucou

Expected Results:  
The label is saved in the viewstate... it should not because EnableViewState is
set to false

This bug breaks one of our project... 
that use this behaviour...

and we often set EnableViewState=false when we don't need it to reduce page

I think it's a major broken feature!

I reproduce it since mono 2.2 (2.2.x -> 2.4.x) not tested on svn

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