public ActionResult Index(TBLILETISIM model) { MailMessage _mm = new MailMessage(); _mm.SubjectEncoding = Encoding.Default; //_mm.Subject = model.ID; _mm.Subject = model.AD; _mm.Subject = model.MAIL; _mm.Subject = model.KONU; _mm.BodyEncoding = Encoding.Default; _mm.Body = model.MESAJ; _mm.From = new MailAddress(ConfigurationManager.AppSettings["emailAccount"]); _mm.To.Add("*****@*****.**"); SmtpClient _smtpClient = new SmtpClient(); _smtpClient.Host = ConfigurationManager.AppSettings["emailHost"]; _smtpClient.Port = int.Parse(ConfigurationManager.AppSettings["emailPort"]); _smtpClient.Credentials = new NetworkCredential(ConfigurationManager.AppSettings["emailAccount"], ConfigurationManager.AppSettings["emailPassword"]); _smtpClient.EnableSsl = bool.Parse(ConfigurationManager.AppSettings["emailSLLEnable"]); _smtpClient.Send(_mm); TempData["Başarılı"] = "Teşekürler En Kısa Zamanda Tarafınıza Dönüş Yapılacaktır."; return(RedirectToAction("Index")); }
protected void Button1_Click(object sender, EventArgs e) { TBLILETISIM t = new TBLILETISIM(); t.ADSOYAD = TextBox1.Text; t.KONU = TextBox4.Text; t.MAIL = TextBox2.Text; t.TELEFON = TextBox3.Text; t.MESAJ = TextBox5.Text; db.TBLILETISIM.Add(t); db.SaveChanges(); }
protected void Button1_Click(object sender, EventArgs e) { TBLILETISIM t = new TBLILETISIM(); t.ADISOYADI = TextBox1.Text; t.TELEFON = TextBox2.Text; t.MAIL = TextBox3.Text; t.MESAJ = TextBox4.Text; db.TBLILETISIM.Add(t); db.SaveChanges(); Response.Redirect("iletisim.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { TBLILETISIM t = new TBLILETISIM(); t.ADSOYAD = TextBox1.Text; t.MAIL = TextBox2.Text; t.TELEFON = TextBox3.Text; t.KONU = TextBox4.Text; t.MESAJ = TextBox5.Text; dr.TBLILETISIM.Add(t); dr.SaveChanges(); Response.Redirect("Default.aspx"); }
public ActionResult Index(TBLILETISIM t) { db.TBLILETISIM.Add(t); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Iletisim(TBLILETISIM t) { db.TBLILETISIM.Add(t); db.SaveChanges(); return(View()); }
public ActionResult Yeniİletişim(TBLILETISIM p1) { db.TBLILETISIM.Add(p1); db.SaveChanges(); return(View()); }