title: Add EventHandler to Content Page
body: <p>I have wired up the <code>Button</code> control on my <code>Master Page</code> in the <code>Content Page</code> as follows:</p>
  
  <pre><code>SiteMaster MasterPage;
  
  protected void Page_Load(object sender, EventArgs e) 
  {
     if (!Page.IsPostBack) 
     {
        MasterPage = (SiteMaster)Page.Master;
        MasterPage.Button1.Click += new EventHandler(Button1_Click);
     }
  }
  
  void Button1_Click(object sender, EventArgs e) 
  {
     MasterPage.Button1_Click(sender, e);
  }
  </code></pre>
  
  <p>However, whenever I click <code>Button1</code> on the page (running under localhost), the <code>Page_Load</code> event fires!</p>
  
  <p>What have I done wrong?</p>
  
  <p>If it helps, the <code>MasterPage.Button1_Click</code> event runs a log in script, so there should be no recursive calls.</p>