title: Send Forget Password using E Mail in Asp.Net
body: <p>i am using a <strong>asp.net framework</strong> for sending a <strong>forget password</strong> through <strong>E-Mail</strong>.
  but i think there's some problem in my code.
  please help .
  The <strong>button_click</strong> event code is give below.</p>
  
  <pre><code>        protected void frgtbtn_Click(object sender, EventArgs e)
            {
               string st = "select E_mail FROM registraion_master WHERE E_mail='" +     Email.Text + "'";
  
             cmd = new SqlCommand(st, sqlcon);
             cmd.Connection.Open();
             SqlDataAdapter sda = new SqlDataAdapter(cmd);
             DataSet ds=new DataSet();
             sda.Fill(ds);
             cmd.Connection.Close();
             if(ds.Tables[0].Rows.Count &gt; 0)
                {
                   MailMessage email = new MailMessage();
                   email.From = new MailAddress(Email.Text); //Enter sender email address.
                   email.To.Add(Email.Text); //Destination Recipient e-mail address.
                   email.Subject = "Your Forget Password:"; //Subject for your request.
                   email.Body = "Hi,Your Password is: " + ds.Tables[0].Rows[0]["Pwd"] + "";
  
                   email.IsBodyHtml = true;
                   //SMTP SERVER DETAILS
                   SmtpClient smtpc = new SmtpClient("smtp.gmail.com");
                   smtpc.Port = 587;
                   smtpc.UseDefaultCredentials = false;
                   smtpc.EnableSsl = true;
                   gmail_ID.Text = "anuragdixit132@gmail.com";//Enter your gmail id here
                   gmail_pwd.Text="vineet";//Enter your gmail id here
                   smtpc.Credentials = new   NetworkCredential(gmail_ID.Text,gmail_pwd.Text);
                   smtpc.Send(email);
                   string script = @"&lt;script language=""javascript""&gt; alert('Password Has Been Sent.......!!!!!.');
                   &lt;/script&gt;;";
                   Page.ClientScript.RegisterStartupScript(this.GetType(), "myJScript1", script);
                  }
                else
                  {
                  pwdlbl.Text = "This email address is not exist in our Database try again";
                  }
  </code></pre>
  
  <p>in this code : there is an exception occour:<strong>Column 'Pwd' does not belong to table Table.</strong></p>