namespace mekmersite.admin { public class Kullanici { private bool _kontrol; public bool Kontrol { get { return _kontrol; } set { _kontrol = value; } } private bool _btClick; public bool BtClick { get { return _btClick; } set { _btClick = value; } } public Kullanici() { this.BtClick = false; } public void Kontrolet(string kullanici,string sifre) { string sorgu = "SELECT COUNT(*) FROM LOGIN WHERE USERNAME='" + kullanici + "' AND PASSWORD='" + sifre + "'"; if (Metotlar.Connection.Komut.IntegerVeriOku(sorgu, 0) > 0) this.Kontrol = true; else this.Kontrol = false; } } }
public partial class login : System.Web.UI.Page { //VeriServisi.KullaniciKontrolClient veri = new VeriServisi.KullaniciKontrolClient(); admin.Kullanici kn = new admin.Kullanici(); //protected void Page_PreRender(object sender, EventArgs e) //{ //} protected void ASPxButton1_Click(object sender, EventArgs e) { kn.Kontrolet(txt_username.Text, txt_pass.Text); if (kn.Kontrol) { FormsAuthentication.RedirectFromLoginPage(txt_username.Text, true); Response.Redirect("~/Default1.aspx"); } else Response.Write("Yanlış Giriş Yaptınız"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)