Passing arguments on new EventHandler

1 posts, 0 answers
  1. ConsumentenClaim
    ConsumentenClaim avatar
    14 posts
    Member since:
    Oct 2010

    Posted 27 Dec 2011 Link to this post

    Hi,

    I am trying to pass (DayRenderEventArgs) e to a newly created EventHandler. After searching on Google I found out that I could use "delegate" (?) to accomplish this, I couldn't find a proper example though...

    Please see the next code:

    protected void trcCalendarID_OnDayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
    {
        foreach (Control control in trcCalendarID.Controls)
        {
            Button btnPlannen = (Button)control.FindControl("btnPlannenID");
            if (btnPlannen != null)
            {
                //btnPlannen.Click += new EventHandler(btnPlannen_Click); //Pass 'e' as argument/parameter here
            }
        }
    }
Back to Top