Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add an event handler in VB.NET? [closed]

This code is part of AjaxControlToolkitSampleSite. To be exact, it is in the AsyncFileUpload control:

 AsyncFileUpload1.UploadedComplete += new EventHandler<AsyncFileUploadEventArgs>(AsyncFileUpload1_UploadedComplete);

How can I translate this to VB.NET?

like image 546
Fabrizio Leoncini Avatar asked Jan 17 '23 19:01

Fabrizio Leoncini


1 Answers

Here you go:

AddHandler AsyncFileUpload1.UploadedComplete, AddressOf AsyncFileUpload1_UploadedComplete

Alternatively, within your code, you can select the AsyncFileUpload1 control from the left-hand dropdown list (just above the code) and then select the UploadComplete event from the right-hand dropdown list.

This will automatically create an event handler with the correct signature using the VB Handles declaration.

like image 187
competent_tech Avatar answered Jan 27 '23 21:01

competent_tech