bir iletişim formu yaptım. Sorunsuz çalışıyor lakin buna güvenlik için otomatik resim oluşturucu yaptım oda sorunsuz çalışıyor otomatik oluşturuyor resimleri herşey sorunsuz lakin yorumları her halukarda labela güvenlik kodu yanlış gönderilmedi yazdırsamda gönderiyor...
sanırım bir yerde yanlış yapıyorum bir bakarmısınız...
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Drawing;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class TalepEkle : System.Web.UI.Page
{
Fonksiyon system = new Fonksiyon();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnEkle_Click(object sender, EventArgs e)
{
if (Session["GuvenlikKelimesi"] == null)
{
Response.Write("Session bulunamadı. Yorumunuz ile ilgili işlem yapılamadı.");
return;
}
if (txGuvenlikKelimesi.Text == Session["GuvenlikKelimesi"].ToString())
Response.Write("Güvenlik kelimesi onaylandı. Yorumunuz ile ilgili işlem başarıyla tamamlandı.");
else
Response.Write("Güvenlik kelimesi onaylanamadı. Yorumunuz ile ilgili işlem yapılmadı.");
SqlConnection baglanti = system.baglan();
SqlCommand cmdKaydet = new SqlCommand("Insert into SitedenTalepler(Tarih,FiyatAraligi,Tel,Email) " +
"values(@Tarih,@FiyatAraligi,@Tel,@Email)", baglanti);
cmdKaydet.Connection = baglanti;
cmdKaydet.Parameters.Add("Tel", txtTel.Text);
cmdKaydet.Parameters.Add("Tarih", DateTime.Now.ToString());
cmdKaydet.Parameters.Add("FiyatAraligi", txtFiyatAraligi.Text);
cmdKaydet.Parameters.Add("Notlar", txtDetay.Content);
cmdKaydet.Parameters.Add("Email", txtEmail.Text);
cmdKaydet.ExecuteNonQuery();
cmdKaydet.Dispose();
baglanti.Close();
}
}