views:

31

answers:

2

I have a cs file called MyCustomColumnClass.cs on App_Code folder. It has a public class called MyCustomFilteringColumn : GridBoundColumn The namespace is MyStuff.

on an aspx page

if (column is MyStuff.MyCustomFilteringColumn)
{
  (column as MyStuff.MyCustomFilteringColumn).ListDataSource =
     GetFilterTable(column.DataField);
}

Error: MyStuff could not be found (are you missing a using directive or an assembly reference?)

A: 

Add using MyStuff; on your aspx codebehind page.

Iulian
+1  A: 

Also make sure the the file MyCustomColumnClass.cs has the Build action: compile property set on. If I'm not mistaken files thrown into App_Code folder get this by default but check it anyway.

Developer Art
I tried the Build action: Compile and able to have the intellisense work when I type using MyStuff. However after this I am getting an error CS0433: The type 'MyStuff.MyCustomFilteringColumn' exists in both 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5a8ba6f0\42336f70\assembly\dl3\00dddbaf\dbddecd7_1854cb01\TelerikSample.DLL' and 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5a8ba6f0\42336f70\App_Code._azr1zza.dll'
Kalls
Try cleaning/rebuilding the project.
Developer Art
I created the empty website and re-added all my files. The Build action: compile property was not set earlier but on the new empty website it was created automatically. I am marking yours as an answer as it solved the build error I had earlier encountered.
Kalls