Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
End Sub
在VB.net,我们有Handles关键字,我想知道如果C#有什么可比性。还是你必须手动关联的所有方法给每个控件的事件(在ASP.NET尤其是)?
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;