InvalidCastException for Object of the same type - Custom Control Load

后端 未结 5 2102
予麋鹿
予麋鹿 2020-12-28 15:35

I have a very wired error, one of my custom controls seems that is create two compiled files, and when I try to load it dynamically with LoadControl() is just f

5条回答
  •  旧巷少年郎
    2020-12-28 15:51

    After a lot of debug on a upgraded ASP.NET website, my last bug was this one on runtime.

    I just checked the Build/Publish option "use fixed naming and single page assemblies" and it solved my case :)

    Here some useful links: https://msdn.microsoft.com/en-us/library/hh475319(v=vs.110).aspx

    https://msdn.microsoft.com/en-us/library/aa479044.aspx

    http://forums.asp.net/t/960707.aspx

提交回复
热议问题