[Mono-bugs] [Bug 46472][Nor] New - ASP.NET : ControlCollection.AddAt can not append new element to end of collection
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Wed, 16 Jul 2003 15:55:47 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by eric@veltman.nu.
http://bugzilla.ximian.com/show_bug.cgi?id=46472
--- shadow/46472 Wed Jul 16 15:55:47 2003
+++ shadow/46472.tmp.28747 Wed Jul 16 15:55:47 2003
@@ -0,0 +1,53 @@
+Bug#: 46472
+Product: Mono/Class Libraries
+Version: unspecified
+OS: SuSE 8.0
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: eric@veltman.nu
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ASP.NET : ControlCollection.AddAt can not append new element to end of collection
+
+Description of Problem:
+ControlCollection.AddAt can not append new element to end of collection.
+With the Microsoft .NET Framework 1.1 it can.
+
+Steps to reproduce the problem:
+Create an aspx page with a WebControls.Table named "tblMain".
+In the aspx page add 2 rows to the table.
+In the code behind file, put the following code in Page_Load :
+
+int NewRowIndex = tblMain.Rows.Count;
+tblMain.Rows.AddAt(NewRowIndex, new TableRow());
+tblMain.Rows[NewRowIndex].Cells.Add(new TableCell());
+tblMain.Rows[NewRowIndex].Cells.Add(new TableCell());
+tblMain.Rows[NewRowIndex].Cells.Add(new TableCell());
+tblMain.Rows[NewRowIndex].Cells.Add(new TableCell());
+tblMain.Rows[NewRowIndex].Cells[0].Text = "Hello world !";
+
+Compile and request the page using the browser.
+
+Actual Results:
+System.ArgumentOutOfRangeException: Argument is out of range
+Parameter name: index out of range
+in <0x00077> 00 System.Collections.ArrayList:set_Item (int,object)
+in <0x000d6> 00 System.Web.UI.ControlCollection:AddAt
+(int,System.Web.UI.Control)
+etc. etc.
+
+Expected Results:
+Correctly rendered table.
+
+How often does this happen?
+Always.
+
+Additional Information:
+Mono 0.25 / xsp 0.4 ( compiled from released version, not from CVS )