예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SQLBaglanti bag = new SQLBaglanti();

            if (!Page.IsPostBack)
            {
                if (Session["KoleksiyonerEmail"] != null)
                {
                    //kategori çek
                    SqlCommand    cmd = new SqlCommand("Select * from Kategori", bag.baglan());
                    SqlDataReader dr  = cmd.ExecuteReader();
                    DropDownListKategori.DataTextField  = "KategoriAdi";
                    DropDownListKategori.DataValueField = "KategoriID";
                    DropDownListKategori.DataSource     = dr;
                    DropDownListKategori.DataBind();

                    string        kEmail     = Session["KoleksiyonerEmail"].ToString();
                    SqlCommand    cmdSession = new SqlCommand("Select * from Koleksiyoner where KoleksiyonerEmail='" + kEmail + "'", bag.baglan());
                    SqlDataReader drSession  = cmdSession.ExecuteReader();
                    DatalistProfilBilgi.DataSource = drSession;
                    DatalistProfilBilgi.DataBind();
                }
                else
                {
                    Response.Redirect("KullaniciGiris.aspx");
                }
            }
        }