title: Returning a string from LINQ
body: <p>For a school project we have to create an evaluation website that requires a login.
  For the database connection I chose LINQ, because it's new and is supposed to be easier/better in use.</p>
  
  <p>I managed to create a login check with the following: </p>
  
  <pre><code>public static Boolean Controle(int id, string wachtwoord)
  {
      DataClassesDataContext context = new DataClassesDataContext();
  
      var loginGebruiker =
          from p in dc.Gebruikers
          where p.GebruikerID == id
          where p.GebruikerWachtwoord == wachtwoord
          select p;
  
  
      return true;
  }
  </code></pre>
  
  <p>Now I'm trying to create a "forgot password" option, where you enter your id and the password gets returned (later it would be emailed to you, don't know how I would do this either, suggestions?)</p>
  
  <p>I tried with the following code:</p>
  
  <pre><code>public static string Forgot(int id)
  {
      var context = new DataClassesDataContext();
  
      var wachtwoordLogin = (
          from p in dc.Gebruikers
          where p.GebruikerID == id
          select p.GebruikerWachtwoord);
  
      return wachtwoordLogin.ToString();
  }
  </code></pre>
  
  <p>Code behind the button on the page:</p>
  
  <pre><code> lbl1.Text = Class1.Forgot(Convert.ToInt32(txt1.Text));
  </code></pre>
  
  <p>Now when I enter the an id of the first user (1), lbl1 becomes this: </p>
  
  <blockquote>
    <p>SELECT [t0].[GebruikerWachtwoord] FROM
    [dbo].[Gebruiker] AS [t0] WHERE
    [t0].[GebruikerID] = @p0</p>
  </blockquote>
  
  <p>I don't know how to solve this and I have been looking everywhere, I hope somebody can help me. </p>
  
  <p>Thanks,
  Thomas</p>