Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
dialunau
451 Views, 2 Replies

To call a function from button handler

Hello,

I'm trying to call a function from a button I added into a form, the problem is that the handler doesn't allow me to call that function because it requires external parameters, which the handler can't read due to input restrictions.

 

How can I fix this?

Some code sample:

Public Sub Button
Dim
oButton1 As New Button() oForm.Controls.Add(oButton1) AddHandler oButton1.Click, AddressOf oButton1_Click
End Sub

Public Sub oButton1_Click(ByVal oSender As System.Object, ByVal oEventArgs As System.EventArgs) Call MyClickFunction(oParam) End Sub 

 

Labels (5)