protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.IsPostBack == false)
     {
         if (Session["KoleksiyonerEmail"] != null)
         {
             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();
             SqlCommand cmdForum = new SqlCommand("Select * from ForumKonu ", bag.baglan());
             DropdownForumKonu.DataSource     = cmdForum.ExecuteReader();;
             DropdownForumKonu.DataTextField  = "ForumKonuBaslik";
             DropdownForumKonu.DataValueField = "ForumKonuID";
             DropdownForumKonu.DataBind();
             SqlCommand    cmdForum1 = new SqlCommand("Select * from ForumKonu where KategoriAdi='" + DropdownForumKonu.SelectedItem.Text + "' ", bag.baglan());
             SqlDataReader drForum   = cmdForum1.ExecuteReader();
             DataListForumKonuGetir.DataSource = drForum;
             DataListForumKonuGetir.DataBind();
         }
         else
         {
             Response.Redirect("KullaniciGiris.aspx");
         }
     }
 }
        protected void DropdownForumKonu_SelectedIndexChanged(object sender, EventArgs e)
        {
            SqlCommand    cmdForum1 = new SqlCommand("Select * from ForumKonu where KategoriAdi='" + DropdownForumKonu.SelectedItem.Text + "' ", bag.baglan());
            SqlDataReader drForum   = cmdForum1.ExecuteReader();

            DataListForumKonuGetir.DataSource = drForum;
            DataListForumKonuGetir.DataBind();
        }
Beispiel #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ForumKonuID = Request.QueryString["ForumKonuID"];
     if (Session["KoleksiyonerEmail"] != null)
     {
         string        kEmail     = Session["KoleksiyonerEmail"].ToString();
         SqlCommand    cmdSession = new SqlCommand("Select * from Koleksiyoner where KoleksiyonerEmail='" + kEmail + "'", baglan.baglan());
         SqlDataReader drSession  = cmdSession.ExecuteReader();
         DatalistProfilBilgi.DataSource = drSession;
         DatalistProfilBilgi.DataBind();
         SqlCommand    cmuGetir = new SqlCommand("Select * from ForumKonu where ForumKonuID=" + ForumKonuID + "", baglan.baglan());
         SqlDataReader druGetir = cmuGetir.ExecuteReader();
         DataListForumKonuGetir.DataSource = druGetir;
         DataListForumKonuGetir.DataBind();
         SqlCommand    cmYorumGetir = new SqlCommand("Select * from ForumKonuYorum where ForumKonuID=" + ForumKonuID + "", baglan.baglan());
         SqlDataReader drYorumGetir = cmYorumGetir.ExecuteReader();
         DatalistMesajGetir.DataSource = drYorumGetir;
         DatalistMesajGetir.DataBind();
     }
     else
     {
         Response.Redirect("KullaniciGiris.aspx");
     }
 }