G
Gilles T.
I have on the same page this code:
<script language="VB" runat="server">
...
...
Private Sub subDatagrid_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
subDatagrid.ItemCommand
...
End Sub
...
...
</script>
<ASPataGrid id="subDatagrid" runat="server"
AllowSorting="False"
...
...
I have this error:
Handles clause requires a WithEvents variable
at this line: Private Sub subDatagrid_ItemCommand(ByVal source As Object,
ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
subDatagrid.ItemCommand
If I add this line in top:
Protected WithEvents subDatagrid As System.Web.UI.WebControls.DataGrid
I have this error:
'subDatagrid' is already declared as 'Protected Dim subDatagrid As
System.Web.UI.WebControls.DataGrid' in this class.
What is the problem?
Can you help me please?
Thanks
<script language="VB" runat="server">
...
...
Private Sub subDatagrid_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
subDatagrid.ItemCommand
...
End Sub
...
...
</script>
<ASPataGrid id="subDatagrid" runat="server"
AllowSorting="False"
...
...
I have this error:
Handles clause requires a WithEvents variable
at this line: Private Sub subDatagrid_ItemCommand(ByVal source As Object,
ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
subDatagrid.ItemCommand
If I add this line in top:
Protected WithEvents subDatagrid As System.Web.UI.WebControls.DataGrid
I have this error:
'subDatagrid' is already declared as 'Protected Dim subDatagrid As
System.Web.UI.WebControls.DataGrid' in this class.
What is the problem?
Can you help me please?
Thanks