In my C# ASP.NET Web Site using .NET Framework 4.0, I have a couple of pages where the related .cs file is not under its related aspx file. I recently moved the files to a subdirectory. I have 10 pages and for 8 of them the move worked just fine and the .cs file is under the aspx. However for two pages, the .cs file now no longer shows below the aspx file. How can I fix this so that the cs is shown correctly underneath the aspx file? When I compare the top of the markup pages, the two problem pages look just like the other 8 pages. I don’t see any issues there.
Share
I found the way to fix this. First I tried excluding and including the files in the Solution Explorer but that resulted in the same results. The way to fix this is to move the files out of the project, then refresh the Solution Explorer. At this point, the files will no longer be part of the project. Then move the files back into the project. Then refresh and the .cs files should be shown below their associated aspx files.