title: ASP.NET Button Click Event Error
body: <p>I have a <code>Main.Master</code> page with a button.<br>
  When in Design view I double click that button it creates a click event in <code>Main.Master</code> page like below;  </p>
  
  <pre><code>&lt;script runat="server"&gt;
  
      protected void btnKayit_Click(object sender, EventArgs e)
      {
  
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>I want it to create at <code>Main.Master.cs</code> page, when I do this maually it gives me this error;  </p>
  
  <pre><code>CS1061: 'ASP.main_master' does not contain a definition for 'btnKayit_Click' and no extension method 'btnKayit_Click' accepting a first argument of type 'ASP.main_master' could be found (are you missing a using directive or an assembly reference?)
  </code></pre>
  
  <p>How can I solve this problem?</p>
  
  <p>EDIT: aspx code;  </p>
  
  <pre><code>&lt;asp:Button CssClass="arama" ID="btnKayit" runat="server" Text="Kayıt Ol" Height="30px"
                                      Width="75px" Style="margin: 0px; float: left; width: 75px; padding: 0px; margin-bottom: 0px;
                                      color: #d55355; font-size: 12px" onclick="btnKayit_Click" /&gt;
  </code></pre>