[Mono-bugs] [Bug 381219] New: Problem with DataSet on Viewstate

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 18 04:57:15 EDT 2008


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


           Summary: Problem with DataSet on Viewstate
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            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: ---


With mono from svn, i can't retrieve a dataset/datatable stored in the
viewstate

Try this test case :

// Default.aspx.cs created with MonoDevelop
// User: hubert at 15:04 11/04/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//

using System;
using System.Web;
using System.Web.UI;
using System.Data;

namespace TestPostBack
{


        public partial class Default : System.Web.UI.Page
        {
                protected override void OnLoad (EventArgs e)
                {
                        if (!IsPostBack)
                        {
                                DataSet ds=new DataSet();
                                DataTable dt=new DataTable();
                                dt.Columns.Add("ID",typeof(string));
                                dt.Rows.Add(new
object[]{"TestEnregistrement1"});
                                ds.Tables.Add(dt);
                                ViewState["DS"]=ds;
                        } else
                        {
                                DataSet ds=(DataSet)ViewState["DS"];
                                Console.WriteLine(ds.Tables.Count);
                        }

                }


        }
}


it fails with 

Server Error in '/' Application

Object reference not set to an instance of an object
Description: HTTP 500. Error processing request.

Stack Trace: 

System.NullReferenceException: Object reference not set to an instance of an
object
  at TestPostBack.Default.OnLoad (System.EventArgs e) [0x00084] in
/home/hubert/Projects/TestPostBack/Default.aspx.cs:31 
  at System.Web.UI.Control.LoadRecursive () [0x00000] in
/home/hubert/mono/mcs/class/System.Web/System.Web.UI/Control.cs:1419 
  at System.Web.UI.Page.ProcessLoad () [0x00015] in
/home/hubert/mono/mcs/class/System.Web/System.Web.UI/Page.cs:1580 
  at System.Web.UI.Page.ProcessPostData () [0x00042] in
/home/hubert/mono/mcs/class/System.Web/System.Web.UI/Page.cs:1559 
  at System.Web.UI.Page.InternalProcessRequest () [0x0004a] in
/home/hubert/mono/mcs/class/System.Web/System.Web.UI/Page.cs:1519 
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
[0x0005b] in /home/hubert/mono/mcs/class/System.Web/System.Web.UI/Page.cs:1335 


Version information: Mono Version: 1.1.4322.2032; ASP.NET Version:
1.1.4322.2032


Dataset retrivied is always null

it's a recent regression...


-- 
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