[Mono-bugs] [Bug 78450][Nor] New - @Page's ClassName directive does not implement namespaces properly

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu May 18 17:57:35 EDT 2006

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 rektide at voodoowarez.com.


--- shadow/78450	2006-05-18 17:57:35.000000000 -0400
+++ shadow/78450.tmp.4968	2006-05-18 17:57:35.000000000 -0400
@@ -0,0 +1,73 @@
+Bug#: 78450
+Product: Mono: Class Libraries
+Version: 1.0
+OS: other
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: rektide at voodoowarez.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: @Page's ClassName directive does not implement namespaces properly
+Please fill in this template when reporting a bug, unless you know what you 
+are doing.
+Description of Problem:
+The @Page Directive's ClasSName attribute does not implement FQ-namespaces.  
+The mono implementation ignores any namespace componenent to a ClassName and 
+generates ASP { class $ClassName {} }, which is invalid code if there is a 
+namespace component, eg if $ClassName = "Foo.Bard".
+From the MSDN docs:
+> A string that specifies the name of the page class that will be 
+> dynamically compiled when the page is requested. This value can be any 
+> valid class name and can include a fully qualified class name. If a value 
+> for this attribute is not specified, the class name for the compiled page 
+> is based on the page's file name and uses the default namespace ASP. If a 
+> value for the ClassName attribute is specified without a full namespace, 
+> then the namespace ASP is used, combined with the specified class name to 
+> create a fully qualified class name.
+http://msdn2.microsoft.com/en-us/library/ydy4x04a(VS.80).aspx describes the @
+Page directive.
+Steps to reproduce the problem:
+Here is an .aspx to demonstrate the problem:
+@@@Begin sample.aspx@@@
+<% @Page ClassName="Foo.Bard" %>
+Hi, I should work according to <asp:HyperLink NavigateUrl='http://msdn2.
+But I used to generate invalid code in Mono.
+@@@end sample.aspx@@@@
+Actual Results:
+Error snippet:
+Line 11: namespace ASP {
+Line 12:     using System;
+Line 13:     using System.Collections;
+Line 14:     using System.Collections.Specialized;
+....continued using statements....
+Line 25:     
+Line 26:     public class Foo.Bard : System.Web.UI.Page, System.Web.
+SessionState.IRequiresSessionState {
+Expected Results:
+Namespace Foo:
+        using .......... 
+        public class Bard : System.Web.UI.Page, System.Web.SessionState.
+IRequireSessionState {
+How often does this happen? 
+Additional Information:
+I do not have IIS to test whether Microsoft is compliant with their own 

More information about the mono-bugs mailing list