title: How do you use a class file in ASP.NET Web Forms Application?
body: <p>I have a class file I'd like to use on my Web Forms Application. This is one that I found in the Internet. I have placed it in the App_Code folder and am trying to use it on the event</p>
  
  <pre><code>protected void sendBtn_Click(object sender, EventArgs e)
          {
  
          }
  </code></pre>
  
  <p>Class File:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  
  public class SendEmail
  {
      public void SendMailMessage(string from, string to, string bcc, string cc, string subject, string body)
      {
          // Instantiate a new instance of MailMessage
          MailMessage mMailMessage = new MailMessage();
  
          // Set the sender address of the mail message
          mMailMessage.From = new MailAddress(from);
          // Set the recepient address of the mail message
          mMailMessage.To.Add(new MailAddress(to));
  
          // Check if the bcc value is null or an empty string
          if ((bcc != null) &amp;&amp; (bcc != string.Empty))
          {
              // Set the Bcc address of the mail message
              mMailMessage.Bcc.Add(new MailAddress(bcc));
          }      // Check if the cc value is null or an empty value
          if ((cc != null) &amp;&amp; (cc != string.Empty))
          {
              // Set the CC address of the mail message
              mMailMessage.CC.Add(new MailAddress(cc));
          }       // Set the subject of the mail message
          mMailMessage.Subject = subject;
          // Set the body of the mail message
          mMailMessage.Body = body;
  
          // Set the format of the mail message body as HTML
          mMailMessage.IsBodyHtml = true;
          // Set the priority of the mail message to normal
          mMailMessage.Priority = MailPriority.Normal;
  
          // Instantiate a new instance of SmtpClient
          SmtpClient mSmtpClient = new SmtpClient();
          // Send the mail message
          mSmtpClient.Send(mMailMessage);
      }
  }
  </code></pre>
  
  <p>I can't access the methods and have tried the following :</p>
  
  <pre><code>SendEmail send = new SendEmail();
  
  var send = new SendEmail();
  
  SendEmail.SendMailMessage
  
  using SendEmail
  </code></pre>
  
  <p>All of which to no avail.</p>
  
  <p>I am an absolute beginner</p>