G
Guest
Hello
I am developing a composite control and I ran into the namespace problem. It boils down to the following simple example
Create a Test ASP.NET application with a Test1.aspx page. Drop an ASP.NET Label control on this page. Change the namespace of the project and of the Test1 class to the "Label". Now the project could be compiled just fine, however, when you navigate to the Test1.aspx page you'll get the following error (See below
Why does .NET framework get confused with my namespace "Label" and try to find my Test1 class in the 'System.Web.UI.WebControls.Label’
Is it possible to avoid this problem, yet keep the namespace "Label" for my project/class
Thanks
Dima Maltse
-------- Error
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'Test1' does not exist in the class or namespace 'System.Web.UI.WebControls.Label' (are you missing an assembly reference?
Source Error
Line 33:
Line 34: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()
Line 35: public class Test1_aspx : Label.Test1, System.Web.SessionState.IRequiresSessionState
Line 36:
Line 37:
Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ctrltest\d8a9a48d\8cd88007\jzs16tht.0.cs Line: 35
I am developing a composite control and I ran into the namespace problem. It boils down to the following simple example
Create a Test ASP.NET application with a Test1.aspx page. Drop an ASP.NET Label control on this page. Change the namespace of the project and of the Test1 class to the "Label". Now the project could be compiled just fine, however, when you navigate to the Test1.aspx page you'll get the following error (See below
Why does .NET framework get confused with my namespace "Label" and try to find my Test1 class in the 'System.Web.UI.WebControls.Label’
Is it possible to avoid this problem, yet keep the namespace "Label" for my project/class
Thanks
Dima Maltse
-------- Error
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'Test1' does not exist in the class or namespace 'System.Web.UI.WebControls.Label' (are you missing an assembly reference?
Source Error
Line 33:
Line 34: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()
Line 35: public class Test1_aspx : Label.Test1, System.Web.SessionState.IRequiresSessionState
Line 36:
Line 37:
Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\ctrltest\d8a9a48d\8cd88007\jzs16tht.0.cs Line: 35