Q:

... (are you missing a using directive or an assembly reference?)

Please help me with the following issue. I am stumped. I have a folder called "one" with only 2 files in it. The first one is DemonstrationOne.aspx:
<%@ Page Language="C#" Title="Demo" CodeBehind="DemonstrationOne.aspx.cs" AutoEventWireup="true" Async="true" %>
<head runat="server">
<title><%: Title %></title>
</head>
<body>
<form id="sayHello" runat="server">
<div>
<asp:Button ID="doSomething" OnClick="DemonstrateMe" Text="Show Label" runat="server"></asp:Button>
<asp:PlaceHolder runat="server" ID="showLiteral" Visible="false">
<p><asp:Literal ID="HelloWorldLabel" runat="server"></asp:Literal></p></asp:PlaceHolder>
</div>
</form>
</body>

And the second is of course DemonstrationOne.aspx.cs:
using System;
using System.Web.UI;
namespace OneDemonstration
{
    public partial class DemonstrateMe
    {
        protected global::System.Web.UI.WebControls.Literal HelloWorldLabel;
        protected global::System.Web.UI.WebControls.PlaceHolder showLiteral;
    }
    public partial class DemonstrateMe : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {  }
        public void sHowHelloWorldLabel(object sender, EventArgs e)
        {
            showLiteral.Visible = true;
            HelloWorldLabel.Text = "Hello World!";
        }
    }
}

I go to visual studio and click on File>Open>Web Site (I do not auto-generate it from the wizard) and click on run. This gives me the error message:

'ASP.demonstrationone_aspx' does not contain a definition for 'DemonstrateMe' and no extension method 'DemonstrateMe' accepting a
  first argument of type 'ASP.demonstrationone_aspx' could be found (are
  you missing a using directive or an assembly reference?)

I would like to note that I am a beginner and having issues with even showing a "Hello World" label in aspx web form (no auto generated wizard). I think it will only work if it is generated by Visual studio?
Please help.

A:

OKAY! It took me long hours of re-reading what I was doing wrong and apparently "web application" and "websites" are different things! Who-da thunk it! So here's the solution.
First of all add a Web.config file with the following code in it:
<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5.2"/>
  </system.web>
</configuration>

Remove CodeBehind and add CodeFile and Inherits in the main .aspx file and fill them out respectively. In my case:
<%@ Page Language="C#" Title="Demo" CodeFile="DemonstrationOne.aspx.cs" Inherits="DemonstrationOne.Demo" AutoEventWireup="true" Async="true" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title><%: Title %></title>
</head>
<body>
<form id="sayHello" runat="server">
<asp:Button runat="server" OnClick="ShowLabel" Text="Show Label" /><br/>
<asp:PlaceHolder runat="server" ID="showLiteral" Visible="false">
<p><asp:Literal ID="HelloWorldLabel" runat="server"></asp:Literal></p>
</asp:PlaceHolder>
</form>
</body>
</html>

And last but not least add a few using directives and remove the excess variable declarations.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DemonstrationOne
{
    public partial class Demo : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        { }

        protected void ShowLabel(object sender, EventArgs e)
        {
            showLiteral.Visible = true;
            HelloWorldLabel.Text = "Work damnitt aarrgghh!!";
        }
    }
}

That should work. Now, go buy a new keyboard. Your current keyboard probably has sticky keys from too much smashing of buttons by your forehead.

