title: CS1061: 'home_aspx' does not contain a definition
body: <p>I am trying to make OnClick event from asp.net button but whenever I make the event it keeps giving me the error shown in the pictures below</p>
  <p>It only happens when I make an event if I put the button without assigning an event to it, it won't give me the error.</p>
  <p>Error I get:</p>
  <p><a href="https://i.stack.imgur.com/X8BAf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X8BAf.png" alt="enter image description here" /></a></p>
  <p>HTML code:</p>
  <pre><code>
  &lt;asp:Content ID=&quot;Content1&quot; ContentPlaceHolderID=&quot;head&quot; runat=&quot;server&quot;&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID=&quot;Content2&quot; ContentPlaceHolderID=&quot;ContentPlaceHolder1&quot; runat=&quot;server&quot;&gt;
      &lt;form runat=&quot;server&quot;&gt;
          &lt;table style=&quot;width: 100%; height: 100%&quot; border=&quot;1&quot;&gt;
              &lt;tr&gt;
                  &lt;td align=&quot;center&quot;&gt;Eve&lt;/td&gt;
                  &lt;td align=&quot;center&quot;&gt;
                      &lt;asp:GridView ID=&quot;GridView_photos_home&quot; runat=&quot;server&quot;&gt;
                      &lt;/asp:GridView&gt;
                  &lt;/td&gt;
                  &lt;td align=&quot;center&quot;&gt;Eve&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td colspan=&quot;3&quot; align=&quot;center&quot; style=&quot;margin-left: 40px&quot;&gt;
  
                      &lt;asp:FileUpload ID=&quot;FileUpload1&quot; runat=&quot;server&quot; /&gt;
                      &lt;br /&gt;
                      &lt;asp:Button ID=&quot;btn_uploadFile&quot; runat=&quot;server&quot; Text=&quot;Upload File&quot; OnClick=&quot;Btn_uploadFile_click&quot; /&gt;
                      &lt;br /&gt;
                      &lt;asp:Label ID=&quot;lbl_isUpload&quot; runat=&quot;server&quot; Text=&quot;&quot;&gt;&lt;/asp:Label&gt;
  
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/form&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  <p>C# code &quot;Code Behind&quot;:</p>
  <pre><code>using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  
  namespace Final_Project_Bachelor
  {
      public partial class Home1 : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
  
          }
  
          protected void Btn_uploadFile_click(object sender, EventArgs e)
          {
  
          }
      }
  }
  </code></pre>