[Mono-bugs] [Bug 507836] New: Profile NET_1_1 : ListItem attribute are erased on postback

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu May 28 11:27:58 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=507836


           Summary: Profile NET_1_1 : ListItem attribute are erased on
                    postback
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          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; rv:1.9.0.10)
Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10

This problem is only for .NET 1.1 profile

Reproducible: Always

Steps to Reproduce:
1. try this aspx :
<%@ Page language="c#" Codebehind="PageTest.aspx.cs" AutoEventWireup="false"
Inherits="WFportail.PageTest" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    <HEAD>
        <title>PageTest</title>
        <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
        <meta name="CODE_LANGUAGE" Content="C#">
        <meta name="vs_defaultClientScript" content="JavaScript">
        <meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
    </HEAD>
    <body MS_POSITIONING="FlowLayout">
        <form id="Form1" method="post" runat="server">

        </form>
    </body>
</HTML>

2. and this aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace WFportail
{
    /// <summary>
    /// Description résumée de PageTest.
    /// </summary>
    public class PageTest : System.Web.UI.Page
    {

        private void Page_Load(object sender, System.EventArgs e)
        {
            // Placer ici le code utilisateur pour initialiser la page
        }

        #region Code généré par le Concepteur Web Form
        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN : Cet appel est requis par le Concepteur Web Form
ASP.NET.
            //
            Console.WriteLine("OnInit");
            InitializeComponent();
            RadioButtonList rbl=new RadioButtonList();
            ListItem list1=new ListItem("test1","test1");
            ListItem list2=new ListItem("test2","test2");
            list1.Attributes.Add("Attr1","Attr1value");
            list2.Attributes.Add("Attr2","Attr2value");
            rbl.Items.Add(list1);
            rbl.Items.Add(list2);
            rbl.AutoPostBack=true;
            Control form=Page.FindControl("Form1");
            form.Controls.Add(rbl);
            rbl.SelectedIndexChanged+=new EventHandler(changed);
            base.OnInit(e);
        }

        private void changed(Object sender, EventArgs e)
        {
            RadioButtonList rblist = (RadioButtonList) sender;
            Console.WriteLine(rblist.Items[0].Attributes.Count);
        }

        /// <summary>
        /// Méthode requise pour la prise en charge du concepteur - ne modifiez
pas
        /// le contenu de cette méthode avec l'éditeur de code.
        /// </summary>
        private void InitializeComponent()
        {    
            this.Load += new System.EventHandler(this.Page_Load);

        }
        #endregion
    }
}
3. run xsp1
4. click on a radio button twice
Actual Results:  
xsp1
1
0

Expected Results:  
On MS.NET 1.1 we get:

xsp1
1
1

The attribute collection of a listitem is erased when a LoadViewState occurs...

It should not!

-- 
Configure bugmail: http://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