Base class includes the field 'X', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager)

后端 未结 12 1339
渐次进展
渐次进展 2021-01-03 21:16

The full error is

The base class includes the field \'ScriptManager1\', but its type (System.Web.UI.ScriptManager) is not compatible with the type of

12条回答
  •  天涯浪人
    2021-01-03 21:51

    "The base class includes the field 'ScriptManager1', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager)."

    Anyone else come across this error?

    I have had that kind of error several times, though not specifically with scriptmanager. Basically it happens when you have a control of one type on the page. And lets say you were idle for sometime. But then you deleted the control and put another one in its place with the same ID, that is when it can occur. I believe it is related to or created by an out of date aspx.designer.cs.

    To fix the problem. I have either had to change the name of the ID of the control, or rebuild the solution. I think there's another way too. I think if you have a aspx.designer.cs file of the name of the aspx file you can change it in there as well.

提交回复
热议问题