remove 
src="systemmanage.cs" from <%@ Page ...%>compile your cs file into a DLL and add the DLL to the bin subdirectory or simply click BUILD in VS.NET

解决方案 »

  1.   

    thanks saucer!
    I am trying!!
      

  2.   

    saucer,请问如何将systemmanage.cs编译成dll文件??
    非常感谢您在百忙中的指点!!
      

  3.   

    what are you using? if you are using VS.NET, just build the project, VS.NET will do it for you, otherwise, try to open a dos window:c:\YourSourceCodeDirectory>csc /t:library /r:System.Web.Dll,EditorLib.Dll /out:YourDllName.dll  systemmanage.cs
      

  4.   

    ..把bin里的东西删除掉。然后重新编译。
      

  5.   

    把bin里的东西删除掉后,还是出错:
    CS1595: 已在多处定义“WebApp_System.MyPage”;
    怎么办?
      

  6.   

    而且我用如下命令执行后出错:
    d:/>csc /t:library /r:System.Web.Dll,EditorLib.Dll /out:d:\Inetpub\wwwroot\WebApp_System\ststemmanage.dll  systemmanage.cs
    错误:
    缺少对“out”命令行选项的文件规范!
      

  7.   

    请问saucer,Lostinet我该如何处理这些错误??
    非常谢谢!
      

  8.   

    你生成的程序一共有多少个dll?
      

  9.   

    其中:EditorLib.dll,WebApp_System.dll,另外在类库中一个是:EditorLib.dll。
    请问如何处理呀??
      

  10.   

    如果你的类库中,必须要有那个类,那么把类定义在类库中,Web工程引用那类库。
    如果不是,把类定义在工程中.
    不要两个都定义同一个类。
      

  11.   

    谢谢Lostine的指点!
    现在我修改了源程序的结构,让EditorLib成为一个类库,它是一个DataGrid的一个Control,用于构建DataGrid,同时让systemmanage.cs单独成为一个类库,它引用EditorLib类库,用于在该DataGrid中添加一些方法,如编辑、修改和删除等,最后让usermanage.aspx直接引用它们。
    编译正常,但是现在的问题是:“执行”时不能显示该DataGrid,原因可能是在usermanage.aspx.cs中没有加载Page_Load。
    请问Lostinet的是:该怎样在该Page_Load中写代码,来加载显示该DataGrid?谢谢!
      

  12.   

    现在可以加载该DataGrid了!在systemmanage.cs中使用Onload()
    方法加载!
    谢谢大家!请大家接分吧!