我收到了错误
Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
Run Code Online (Sandbox Code Playgroud)
在以下代码中..
Public Sub selCurrentManuf_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles selCurrentManuf.SelectedIndexChanged
End Sub
Run Code Online (Sandbox Code Playgroud)
随附的下拉列表如下......
<asp:DropDownList
OnSelectedIndexChanged="selCurrentManuf_SelectedIndexChanged"
selectedvalue='<%#Container.DataItem("c1_manufidcurrent")%>'
ID="selCurrentManuf"
Runat="Server"
DataTextField="c4_Desc"
DataValueField="c4_manufid"
DataSource="<%# GetCurrentManuf() %>"
autopostback="true"
></asp:DropDownList>
Run Code Online (Sandbox Code Playgroud)
小智 7
当我重命名一个字段时,我收到了这个错误。出于某种原因,有时设计器会搞砸并且不会在 form.aspx.designer.vb 文件中重命名它,如果您查看那里并修复名称,它可以解决这个问题,如果这发生在您身上。
因此,请仔细检查您的偶数处理程序、aspx 文件和designer.aspx 文件中的字段名称是否相同。
| 归档时间: |
|
| 查看次数: |
68919 次 |
| 最近记录: |