Reputation: 79
Whenever I open an existing project in VS 2005, the designer.cs
files do not show up under .aspx
files, and due to this when I add controls in .aspx
the designer.cs
is not updated.
Below is how the structure looks:
+----AAAConfirm.aspx
. .
. ..AAAConfirm.aspx.cs
.
.----AAAConfirm.aspx.designer.cs
Upvotes: 0
Views: 166
Reputation: 13350
You need to "show all files" for the project, it most likely got removed from the project file by accident. When you see the file in Visual Studio, right click the file and select "Add to Project".
Or
Check the project file and make sure the designer file's compile tag has a child element called DependentUpon
The XML section specifying the file's inclusion in the project should look something like this
<Compile Include="AAAConfirm.aspx.designer.cs">
<DependentUpon>AAAConfirm.aspx</DependentUpon>
</Compile>
Also check that the markup page AAAConfirm.aspx
has the correct codebehind and inherit reference in the <%Page>
tag. Did you maybe change namespaces? Try setting the Inherits
attribute value to the class name without the namespace.
Upvotes: 1
Reputation: 63065
Copy your project to some other folder and
Ref : Tip: regenerate aspx.designer.cs files when corrupted
Upvotes: 0