Unable to cast object of type 'X' to type 'X' - ASP.NET

后端 未结 6 1577
时光取名叫无心
时光取名叫无心 2020-12-11 19:12

I am currently working with a ASP.NET Web site project in Visual Studio 2008 and everytime I make a change to code behind page for a user control and browse to page that is

6条回答
  •  粉色の甜心
    2020-12-11 19:58

    That makes sense, from what I understand.

    You're making a change to the code-behind. In order for those changes to take effect, you'd need to build that project so that the code-behind can be compiled into the DLL file for that project. When you change the code-behind, and don't build the project, you've essentially got two versions of that page, and ASP.Net can't resolve the two versions. So, when you compile the class, the changes are reconciled into the DLL.

提交回复
热议问题