[Mono-bugs] [Bug 542076] New: 'No data item' error for formview dropdownlist databind during page onload event

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 25 03:57:24 EDT 2009


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


           Summary: 'No data item' error for formview dropdownlist
                    databind during page onload event
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i586
        OS/Version: openSUSE 11.1
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: chrisbrown76 at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=319859)
 --> (http://bugzilla.novell.com/attachment.cgi?id=319859)
Test case source files

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.3)
Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)

If a dropdown list, that exists in the template of a formview, is databound
during the page_onload event a 'No data item' error occurs when attempting to
set the selectedvalue of another dropdownlist in the formview from the
formviews dataitem.

Reproducible: Always

Steps to Reproduce:
1. Copy attached test case source files to Mono environment.
2. Run 'xsp2' from command line at location of source files.
3. Browse to http://localhost:8080.
Actual Results:  
The following error occurs:

No data item

Description: HTTP 500. Error processing request.

Stack Trace:

System.InvalidOperationException: No data item
  at System.Web.UI.Page.GetDataItem () [0x00032] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Page.cs:2853 
  at ASP.index_aspx.__BuildControl__bctrl_4_DB_0 (System.Object sender,
System.EventArgs e) [0x00000] 
  at System.Web.UI.Control.OnDataBinding (System.EventArgs e) [0x00029] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Control.cs:933 
  at System.Web.UI.WebControls.ListControl.OnDataBinding (System.EventArgs e)
[0x00000] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs:392 
  at System.Web.UI.WebControls.ListControl.PerformSelect () [0x00000] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs:505 
  at System.Web.UI.WebControls.BaseDataBoundControl.DataBind () [0x00000] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs:143 
  at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound ()
[0x00016] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs:149 
  at System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender
(System.EventArgs e) [0x00007] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs:182 
  at System.Web.UI.WebControls.ListControl.OnPreRender (System.EventArgs e)
[0x00000] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs:411 
  at System.Web.UI.Control.PreRenderRecursiveInternal () [0x0003b] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Control.cs:1536 
  at System.Web.UI.Control.PreRenderRecursiveInternal () [0x00072] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Control.cs:1543 
  at System.Web.UI.Control.PreRenderRecursiveInternal () [0x00072] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Control.cs:1543 
  at System.Web.UI.Control.PreRenderRecursiveInternal () [0x00072] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Control.cs:1543 
  at System.Web.UI.Control.PreRenderRecursiveInternal () [0x00072] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Control.cs:1543 
  at System.Web.UI.Control.PreRenderRecursiveInternal () [0x00072] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Control.cs:1543 
  at System.Web.UI.Control.PreRenderRecursiveInternal () [0x00072] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Control.cs:1543 
  at System.Web.UI.Page.ProcessLoadComplete () [0x00089] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Page.cs:1647 
  at System.Web.UI.Page.InternalProcessRequest () [0x001cb] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Page.cs:1536 
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
[0x0005b] in
/root/mono-svn-latest/mono/mcs/class/System.Web/System.Web.UI/Page.cs:1353 

Version information: Mono Runtime Version: /trunk/mono r142602 Fri Sep 25
09:10:54 NZST 2009; ASP.NET Version: 2.0.50727.1433


Expected Results:  
Both DropDownList1 and DropDownList2 are correctly databound and 'Dean
Straight' is the selected option for DropDownList1.

I'm not entirely sure whats happening here and it took a while to create a test
case based on my actual applications code. XmlDataSources are used in the test
case but the same result occurs using ObjectDatasources in my application. The
error does not occur if the 'If' statement in the Page_Onload event is
commented out. In the test case I'm using a list as a datasource but in my
application the datasource is the result of a call to a remoting server. This
seems to suggest that just the act of creating and databinding a datasource is
enough to create the error. It just seems that the combination of elements
(formview, databind in the onload event etc) just cause a problem.

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