title: "are you missing a using directive or an assembly reference? " C# ASP.NET error
body: <p>I am an amateur programmer in C# , ASP.NET . I have decided to create a blog and I have stumbled this problem when I am creating my page for blog post .</p>
  
  <p>Error : </p>
  
  <blockquote>
    <p>'adminpanel_aspx' does not contain a definition for 'submit_btn' and
    no extension method 'submit_btn' accepting a first argument of type
    'adminpanel_aspx' could be found (are you missing a using directive or
    an assembly reference?)</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/oBzmu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oBzmu.png" alt="An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. "></a> </p>
  
  <p>However, I couldn't solve the problem even if I have hooked up the button with code behind.</p>
  
  <p><a href="https://i.stack.imgur.com/tl4FT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tl4FT.png" alt="This is the properties for the button"></a></p>
  
  <p>Some extra information : </p>
  
  <p>Front end button code : </p>
  
  <pre><code>    &lt;asp:Button ID="post_submit_btn" runat="server" Text="Save Changes" CssClass="btn btn-primary" OnClick="submit_btn" OnDataBinding="submit_btn"  /&gt;
  </code></pre>
  
  <p>My references</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Xml;
  using System.Data;
  </code></pre>
  
  <p>The submit_btn method at code behind : </p>
  
  <pre><code>private void submit_btn(object sender, EventArgs e)
          {
              Button button = post_submit_btn; 
            button = sender as Button; 
  
              string blogtitle;
              string blogdes;
              string docPath = @"~/Data/blog_post.xml";
              XmlDocument xml_doc = new XmlDocument();
              xml_doc.Load(Server.MapPath(docPath));
              XmlNode root;
              root = xml_doc.DocumentElement;
  
              blogtitle = blog_title.Text.ToString();
              blogdes = blog_des.Value.ToString();
  
              XmlNode postNode = xml_doc.CreateElement("post-name");
              XmlNode desNode = xml_doc.CreateElement("description");
              XmlNode timeNode = xml_doc.CreateElement("date");
              XmlNode autherNode = xml_doc.CreateElement("Auther");
  
              postNode.InnerText = blogtitle;
              desNode.InnerText = blogdes;
  
              postNode.AppendChild(desNode);
              xml_doc.Save(Server.MapPath(docPath));
  
  
          }
  </code></pre>