[Mono-bugs] [Bug 67304][Nor] New - Wrong behaviour of System.Web.UI.Control.FindControl()

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 1 Oct 2004 06:42:29 -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 tha@adv.magwien.gv.at.


--- shadow/67304	2004-10-01 06:42:29.000000000 -0400
+++ shadow/67304.tmp.19991	2004-10-01 06:42:29.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 67304
+Product: Mono: Class Libraries
+Version: unspecified
+OS: other
+OS Details: fedora core 2
+Status: NEW   
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: tha@adv.magwien.gv.at               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Wrong behaviour of System.Web.UI.Control.FindControl()
+Mono Runtime: 1.0.2
+Description of Problem:
+If the Application calls FindControl() on a Control within a 
+NamingContainer which is no NamingContainer and has no ChildControl a null-
+reference is returned.
+Steps to reproduce the problem:
+1. see test case in Attachment
+Actual Results:
+FindControl returns null
+Expected Results:
+FindControl returns the requested control from the NamingContainer of the 
+actual control
+How often does this happen? 
+Additional Information:
+In the implementation of the System.Web.UI.ControlClass (sources from 
+09/19/2004) FindControl first asks for ChildControls. If there are no 
+ChildControls it returns null. I think, it should return null only if
+   the Control has no ChildControls
+   AND there is no NamingContainer set for it.