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 giris : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

protected void Button1_Click(object sender, EventArgs e)
{

SqlConnection baglan = new SqlConnection("Data Source=CASPERNIRVANA;Initial Catalog=musteri;Integrated Security=True");

//string vkulad, vparola;
//vkulad = TextBox1.Text;
//vparola = TextBox2.Text;

SqlCommand komut = new SqlCommand();
baglan.Open();
komut.CommandText="select * from musteri where @vkulad=ad and @vparola=soyad";
komut.Parameters.AddWithValue("@vkulad",TextBox1.Text);
komut.Parameters.AddWithValue("@vparola", TextBox2.Text);
komut.Connection = baglan;
SqlDataReader oku = komut.ExecuteReader();
if (oku.HasRows == true) ;
{
Response.Redirect("kayit.aspx");

}

baglan.Close();
}
}
}

Yönetim Bilişim Uzmanı | Bilal MASKAN