在web目錄下,有2個文件夾,1--Admin文件夾,2--modules文件夾
在Admin/Manage.aspx.cs中有如下代碼
((modules.forumlistmodule)e.Item.FindControl("Forumlistmodule1")).groupID = GroupID;
((modules.forumlistmodule)e.Item.FindControl("Forumlistmodule1")).forumSet = forumSet;其中forumlistmodule為modules文件夾下自定義控件。
運行出錯,提示如下:
錯誤 1 The type or namespace name 'forumlistmodule' could not be found (are you missing a using directive or an assembly reference?)謝謝!

解决方案 »

  1.   

    我的網站裡的文件都沒namespace,直接是partial class,為什麼?
      

  2.   


    WebSite编程模型就是这样一个鬼样子
    刚发布VS2005的时候我就觉得微软发了一次神经
    还好,后来赶紧发布了一个插件
    用来支持WebApplication编程模型
    楼主可以考虑下载个WebApplicationProjectSetup.msi安装否则的话,可以把modules下面的代码放在一个新的工程下单独编译成dll
    在web项目中引用这个dll就不会有上面的现象了
      

  3.   

    asp.net2.o中很多东西是看不到的
      

  4.   


    在不放在一个新的工程下单独编译成dll的情況下,有沒有其它方法實現呢?
    ((modules.forumlistmodule)e.Item.FindControl("Forumlistmodule1")).groupID = GroupID;
    ((modules.forumlistmodule)e.Item.FindControl("Forumlistmodule1")).forumSet = forumSet;