Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
End Sub
In VB.net, we have the Handles keyword, I'm wondering if C# has anything comparable. Or do you have to manually wire all the methods to each control's event (in ASP.NET especially)?
Nope. You will have to wire up the event like this
Menu1.MenuItemClick += Menu1_MenuItemClick;
You have to assign the events yourself using the +=
syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With