Sorry if this is a duplicate; I have searched extensively for a basic explanation.
TL;DR - I already know how to wire up events, my question relates to supporting information and event handler naming convention(s), which I cannot find an answer to. Having already read here, here, here, here, and here I think information overload has confused me, or I'm overlooking the obvious.
I have a huge web forms (VB) solution that needs converting to C#, starting with some Web Forms Server Control projects. Within each, VB uses the
Public Class Accordion
Private Sub Accordion_Init(sender As Object, e As System.EventArgs) Handles Me.Init
Private Sub AccordionPanelHolder_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Private Sub AccordionPanelHolder_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
PreRender += AccordionPanelHolder_PreRender;
Load += AccordionPanelHolder_Load;
Init += Accordion_Init;
private void AccordionPanelHolder_PreRender(object sender, System.EventArgs e)
public partial class TestPage : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
// to do
AutoEventWireUp is true, the following methods would be looked for:
So, the methods must use this exact name.
If you set
AutoEventWireUp to false, you'll have to add the handler for any of this events by hand.
You can have a look here for more info.