title: Datacontext in LINQ. "Does not exist in the current context"
body: <p>I keep on receiving this error message. I followed the instructions but it seems it is still not working? what is the solution for this? here's my code</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using System.Data.Linq;
  using System.Data.Linq.Mapping;
  
  namespace WindowsFormsApplication1
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void button1_Click(object sender, EventArgs e)
          {
              MyDatabaseDataContext = new MyDatabaseDataContext(@"C:\Users\John\Documents\visual studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\MyDatabase.mdf");
          }
  
  
      }
  }
  </code></pre>
  
  <p>Here's the stacktrace</p>
  
  <pre><code>Error   1   'WindowsFormsApplication1.Form1' does not contain a definition for 'Form1_Load' and no extension method 'Form1_Load' accepting a first argument of type 'WindowsFormsApplication1.Form1' could be found (are you missing a using directive or an assembly reference?)   C:\Users\John\Documents\Visual Studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs 92  55  WindowsFormsApplication1
  </code></pre>