title: The name 'Message' does not exist in the current context
body: <p>I keep getting the following error message at compile time:  "The name 'Message' does not exist in the current context".  All I'm trying to do is pop up a message box.  Here are my namespaces declared at the top of my code behind page:</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.Net.Mail;
  </code></pre>
  
  <p>And here is my code to show a message on a button click:</p>
  
  <pre><code>    protected void EmailAbout_Click(object sender, EventArgs e)
      {
          MailMessage myMessage = new MailMessage();
          myMessage.Subject = "Exception Handling Test";
          myMessage.Body = "Test message body";
          myMessage.From = new MailAddress("me@yourprovider.com");
          myMessage.To.Add(new MailAddress("you@yourprovider.com"));
  
          SmtpClient mySmtpClient = new SmtpClient();
          mySmtpClient.Send(myMessage);
          Message.Text = "Message sent";
      }
  </code></pre>
  
  <p>Is this a case of a missing namespace?  It seems so basic yet I can't figure it out?  Thanks in advance!</p>
  
  <p>Here is the markup page:</p>
  
  <pre><code>&lt;%@ Page Title="About SalesPro" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
  CodeBehind="About.aspx.cs" Inherits="WebApplication2.About" %&gt;
  
  &lt;asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"&gt;
  &lt;/asp:Content&gt;
  
  &lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt;
      &lt;h2&gt;
          About, Inc.
      &lt;/h2&gt;
  
      &lt;p&gt;
          Some Stuff here... 
      &lt;/p&gt;
  
      &lt;p&gt;
          &lt;asp:Button ID="EmailAbout" runat="server" Text="Email Information" 
              onclick="EmailAbout_Click" /&gt;
      &lt;/p&gt;
  &lt;/asp:Content&gt;
  </code></pre>