using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data.Sql;

namespace WebApplication3
{
public partial class kayit : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

protected void Button1_Click(object sender, EventArgs e)
{

SqlConnection baglanti = new SqlConnection("Data Source=CASPERNIRVANA;Initial Catalog=musteri;Integrated Security=True");
string vad;
string vsoyad;
vad = TextBox1.Text;
vsoyad = TextBox2.Text;

baglanti.Open();
SqlCommand kayit = new SqlCommand("insert into musteri(ad,soyad) values(@pad,@psoyad)", baglanti);
kayit.Parameters.Add("pad", vad);
kayit.Parameters.Add("psoyad", vsoyad);
kayit.ExecuteNonQuery();
baglanti.Close();

Response.Redirect("goster.aspx");
}
}
}

Yönetim Bilişim Uzmanı | Bilal MASKAN