我现在是两个工程都是2008 3.5 我在一个工程里面建立了 ABC.aspx ,下面所属两个文件ABC.aspx.Designer.cs , ABC.aspx .cs ,  
当我移动到另一个工程下面时 ABC.aspx.Designer.cs 脱离了ABC.aspx 的包含,命名空间都修改了,还是没找到问题在哪里。

解决方案 »

  1.   

    看看 abc.aspx文件最上面的<page> 指令.你就知道了.
      

  2.   

    .Designer.cs 页面设计代码
    .aspx.cs 类代码
    .aspx页面代码
      

  3.   

    你打开aspx文件,然后看最上边的一行
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="xxx.xxx.Web.ASPX.Search" %>看到CodeBehind和Inherits了吗?
    前者指向的是你的aspx.cs文件,后者是xx.Designer.cs,你打开Designer.cs看看里面的名称空间则类名就明白了.
      

  4.   

    去你的项目文件夹处,找到xxx.csproj文件(就是绿图标的那个)
    用文本编辑器打开.然后找到类似下面的东西
    <Compile Include="ASPX\Search.aspx.cs">
          <SubType>ASPXCodeBehind</SubType>
          <DependentUpon>Search.aspx</DependentUpon>
        </Compile>
        <Compile Include="ASPX\Search.aspx.designer.cs">
          <DependentUpon>Search.aspx</DependentUpon>
        </Compile>自己改吧改吧就行了.
      

  5.   

    看到DependentUpon那个节点了吗?仔细看看~
    看明白了吧??