开发者

App_Code folder - are you missing a using directive or assembly reference

开发者 https://www.devze.com 2023-01-16 15:36 出处:网络
I h开发者_C百科ave a cs file called MyCustomColumnClass.cs on App_Code folder. It has a public class called MyCustomFilteringColumn : GridBoundColumn

I h开发者_C百科ave 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?)


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.


Add using MyStuff; on your aspx codebehind page.

0

精彩评论

暂无评论...
验证码 换一张
取 消