F
fabrice
Hello,
I d like to modify the Onclik Event of an ImageButton control in code
behind.
But when i do it , i get an error.
This is ma code :
The control is the pasx page :
<asp:ImageButton id="id1" Visible="false" runat="server"
EnableViewState="false" CausesValidation="false" ImageAlign="AbsMiddle" />
Déclaration in Code Behind :
...
Protected WithEvents id1 As ImageButton
...
Sub Page_Load...
If .. mon test
id1 .Visible=True
AddHandler id1.onClick, AddressOf doExcelExport
....
End Sub
The error :
Compiler Error Message: BC30390:
'System.Web.UI.WebControls.ImageButton.Protected Overridable Sub OnClick(e
As System.Web.UI.ImageClickEventArgs)' is not accessible in this context
because it is 'Protected'.
If someone can explain me the problem et show me how to do that ..
thanks a lot
fabrice.
I d like to modify the Onclik Event of an ImageButton control in code
behind.
But when i do it , i get an error.
This is ma code :
The control is the pasx page :
<asp:ImageButton id="id1" Visible="false" runat="server"
EnableViewState="false" CausesValidation="false" ImageAlign="AbsMiddle" />
Déclaration in Code Behind :
...
Protected WithEvents id1 As ImageButton
...
Sub Page_Load...
If .. mon test
id1 .Visible=True
AddHandler id1.onClick, AddressOf doExcelExport
....
End Sub
The error :
Compiler Error Message: BC30390:
'System.Web.UI.WebControls.ImageButton.Protected Overridable Sub OnClick(e
As System.Web.UI.ImageClickEventArgs)' is not accessible in this context
because it is 'Protected'.
If someone can explain me the problem et show me how to do that ..
thanks a lot
fabrice.