Mafullah Backtrack Mafullah Backtrack - 5 months ago 12
Ajax Question

Timer_Tick is not a member of an aspx page

I have a

control and
for recheck on some several time. but my problem is why
is detected with not a member for my aspx page error message,
Here my code

<asp:UpdatePanel ID="UpdatePanel4" runat="server">
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Timer1_Tick" />
<asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="60"></asp:Timer>

And here my problem,

enter image description here

Here my code behind :

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
If UUID <> "" Then

If UUID = Cardode Then
scnRFID.Text = CardIdent
Timer1.Enabled = False
Timer1.Enabled = false

End If

End If

End Sub


Your problem is that Timer1_Tick is private. Internally .aspx file is represented by a class that inherits from code behind class, so private methods are not visible for it.

Make it protected and everything should work fine