我有一個.aspx註冊頁面。我已經使用C#編寫代碼。在註冊頁面中,用戶可以註冊自己輸入他的電子郵件ID和密碼。我想將電子郵件ID和密碼發送到用戶在成功提交頁面後註冊時輸入的用戶電子郵件ID。如何發送用戶名和密碼。請給我一些代碼。如何在註冊後發送用戶名和密碼到電子郵件ID
我已經寫了登記
string str = FileUpload1.FileName;
FileUpload1.PostedFile.SaveAs(Server.MapPath(".") + "//uploadimage//" + str);
string path = "~//upload//" + str.ToString();
con.Open();
SqlCommand cmd = new SqlCommand("insert into Registration(memberid,loginemailid,password,firstname,lastname,dob,maritalstatus,photo,about,lastattended,years,slno,indexno,qualification,years1,specialachivements,currentoccupation,companyname,currentdesignation,preadd,precity,prestate,prepin,peradd,percity,perstate,perpin,mobileno,officeno,telno,emailid) values('" + mid + "','" + TextBox1.Text + "','" + TextBox3.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + dob + "','" + DropDownList4.Text + "','" + path + "','" + TextBox7.Text + "','" + DropDownList5.Text + "','" + DropDownList6.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "','" + TextBox10.Text + "','" + drop1 + "','" + TextBox11.Text + "','" + TextBox12.Text + "','" + TextBox13.Text + "','" + TextBox14.Text + "','" + TextBox15.Text + "','" + TextBox16.Text + "','" + TextBox17.Text + "','" + TextBox18.Text + "','" + TextBox19.Text + "','" + TextBox20.Text + "','" + TextBox21.Text + "','" + TextBox22.Text + "','" + mobno + "','" + TextBox25.Text + "','" + TextBox26.Text + "','" + TextBox27.Text + "')", con);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("Successfull.aspx");
**從不**在電子郵件中發送密碼。 – SLaks
您有一個SQL注入漏洞。 – SLaks
**不要以明文**存儲密碼。 – SLaks