Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //NewsClass = Request.QueryString["classname"].ToString();
         DataTable bb = NewsBll.banben();
         NewsBB.DataSource = bb;
         NewsBB.DataBind();
         if (bb != null)
         {
             News_ClassName3.Text = bb.Rows[0][6].ToString();
         }
     }
 }
Пример #2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (DropDownList_Class.SelectedIndex == 0)
     {
         ListView1.DataSource = NewsBll.luandou();
         ListView1.DataBind();
     }
     else if (DropDownList_Class.SelectedIndex == 1)
     {
         ListView1.DataSource = NewsBll.zatan();
         ListView1.DataBind();
     }
     else if (DropDownList_Class.SelectedIndex == 2)
     {
         ListView1.DataSource = NewsBll.banben();
         ListView1.DataBind();
     }
     else
     {
         ListView1.DataSource = NewsBll.kazu();
         ListView1.DataBind();
     }
 }