Handles clause requires a WithEvents variable defined in the containing type or one of its base types

前端 未结 8 2004
旧巷少年郎
旧巷少年郎 2021-01-04 03:15

I get the error

Handles clause requires a WithEvents variable defined in the containing type or one of its base types.

in the following co

8条回答
  •  北荒
    北荒 (楼主)
    2021-01-04 03:19

    I've gotten this error when for some I've renamed a field. For some reason sometimes the designer messes up and doesn't rename it in the form.aspx.designer.vb file, if you look in there and fix the name it can fix this issue if that has happened to you.

    So double check that the field name is the same in your even handler, the aspx file and the designer.aspx files.

提交回复
热议问题