ASP.NET controls cannot be referenced in code-behind in Visual Studio 2008

前端 未结 16 1320
面向向阳花
面向向阳花 2020-12-25 12:28

Ok, so, my visual studio is broken. I say this NOT prematurely, as it was my first response to see where I had messed up in my code. When I add controls to the page I can\'t

16条回答
  •  隐瞒了意图╮
    2020-12-25 12:34

    I observed this happens because of missing .designer.cs file. Following fixed this issue in my case (basically I had these files copied from VS 2005 web project to VS 2010 project): Right Click on .aspx file and select menu "Convert to Web site", this will create .designer.cs file and then it should work file.

提交回复
热议问题