Add a new control defined in class ClassName (ClassName.ascx and ClassName.ascx.cs files).
The path is: c:\..\Project\WebuserControls\ControlType
The namespace is Project.WebUserControls.ControlType
Throughout the project I call "Project.WebUserControls.ControlType.ClassName.SomeMethod();" When I compile I get error "CS0234 The type or namespace name 'Project.WebUserControls.ControlType' does not exist in the class or namespace 'Project.WebUserControls' (are you missing an assembly reference?)" even though it most certainly does exist in that namespace. Also, Intellisense can't find the namespace, or anything in it.
After much googling about I find this at StackOverflow, which leads to a solution.
... <namespaces> .... <add namespace="Project.WebUserControls" />
Intellisense is still borked, but the project now compiles.
Interestingly, if I replace "namespace="Project.WebUserControls" with namespace="Project.WebUserControls.ControlType" it won't compile.
Anyone else seen this? Or have any idea why it happens?
And right after I post this, the fix stops working... What. The. Fuck?
Fixed? Moved ClassName.ascx.cs and .ascx from c:\..\Project\WebUserControls\ControlType to c:\..\Project\WebuserControls\ and similarly from namespace Project.WebUserControls.ControlType to Project.WebUserControls
No idea why this would fix it.
Update [2010-11-18 12:58:2 by wiredog]: Turns out that, while c# and .net allow static methods, those methods don't reliably work in asp component classes.
|< Currently Playing | ATTN FREEWORLD INFIDELS: COMMUNISM IS BAD >|