Merhabalar, size örnek bir kod satırı atayım ona göre düzenleyebilirsiniz.
SqlConnection baglanti = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=" + Server.MapPath("\\App_Data\\veritabani.mdf") + ";Integrated Security=True;User Instance=True");
baglanti.Open();
SqlCommand sorgu = new SqlCommand("INSERT INTO staj(tarih,gun,baslik,mesaj) VALUES ('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "')", baglanti);
int olay = sorgu.ExecuteNonQuery();
if (olay > 0)
Literal1.Text = "Successfully Sent.";
else
Literal1.Text = "Unuccessfully Sent.";
Müsaitseniz bağlanabilir misiniz hocam? ilk proje olduğu için biraz karmaşık.