[Mono-bugs] [Bug 76415][Nor] New - ListControl.SelectedValue does
not throw exception when assigned invalid value
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Oct 11 23:42:35 EDT 2005
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 nathan at mammoth.com.au.
http://bugzilla.ximian.com/show_bug.cgi?id=76415
--- shadow/76415 2005-10-11 23:42:35.000000000 -0400
+++ shadow/76415.tmp.1609 2005-10-11 23:42:35.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 76415
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com
+ReportedBy: nathan at mammoth.com.au
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ListControl.SelectedValue does not throw exception when assigned invalid value
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+Using Mono 1.1.9.2, assigning an invalid SelectedValue to a ListControl
+does not throw an ArgumentOutOfRangeException. I've tried this on Mono
+1.1.7 and the exception is thrown. Testing on Windows also throws the
+exception. MSDN documents this behaviour.
+
+
+Steps to reproduce the problem:
+
+Sample Test.aspx file:
+
+<form runat="server">
+<asp:DropDownList id="ddl" runat="server">
+<asp:ListItem value="1">Test</asp:ListItem>
+</asp:DropDownList>
+</form>
+
+<script language="c#" runat="server">
+void Page_Init(object sender, EventArgs e)
+{
+ ddl.SelectedValue = "2";
+}
+</script>
+
+
+
+Actual Results:
+
+SelectedValue is ignored
+
+Expected Results:
+
+ArgumentOutOfRangeException should be thrown
+
+
+How often does this happen?
+
+Every time.
+
+
+Additional Information:
+
+The same problem exists when using databinding -
+ArgumentOutOfRangeException should be thrown during DataBind() / assignment
+to SelectedValue (which ever occurs later) but is not thrown.
More information about the mono-bugs
mailing list