示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["User_Id"] != null)
     {
         Response.Redirect("~/AnaSayfa.aspx");
     }
     else
     {
         if (!IsPostBack)
         {
             HttpCookie LoginCookie = Request.Cookies["SecureOdev_Login"];
             if (LoginCookie != null)
             {
                 TxtKullanici.Text = LoginCookie["User"];
             }
         }
         if (TxtKullanici.Text == "")
         {
             TxtKullanici.Focus();
         }
         else
         {
             TxtSifre.Focus();
         }
     }
 }
 //Form üzerindeki alanlar temizleniyor
 private void Temizle()
 {
     CmbKullanici.Items.Clear();
     TxtKullanici.Clear();
     TxtParola.Clear();
     CmbKurum.Items.Clear();
     RTxtAciklama.Clear();
     CmbKullanici.Text = "Kullanıcı Seçiniz";
     CmbKurum.Text     = "Kurum Seçiniz";
 }