//下拉框显示加载页面 protected void dropdown1_SelectedIndexChanged2(object sender, EventArgs e) { //获取下拉文本框中的值 string zhi = this.dropdown1.SelectedValue.ToString(); if (zhi == "默认排序") { this.RP_details.DataSource = BrowseBLL.SelectDetails(); this.DataBind(); } if (zhi == "最新上线") { this.RP_details.DataSource = BrowseBLL.ZuiXinshangxian(); this.DataBind(); } if (zhi == "最高目标金额") { this.RP_details.DataSource = BrowseBLL.MaxMoney(); this.DataBind(); } if (zhi == "最多喜欢人数") { this.RP_details.DataSource = BrowseBLL.MaxLove(); this.DataBind(); } if (zhi == "最多支持金额") { this.RP_details.DataSource = BrowseBLL.MaxZhichimoney(); this.DataBind(); } //从数据库中查询 //绑定显示 }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.DataList1.DataSource = BrowseBLL.SelectDetails(); this.DataList1.DataBind(); this.DataList2.DataSource = ProjectBLL.select2(); this.ImageButton3.Visible = false; this.DataList2.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.DataList1.DataSource = BrowseBLL.SelectDetails(); this.DataList1.DataBind(); //this.DataList1.DataSource = ProjectBLL.select(); //this.DataList1.DataBind(); //需要判断 this.DataList2.DataSource = ProjectBLL.select2(); this.ImageButton3.Visible = false; this.DataList2.DataBind(); //string name = Request.QueryString["name"]; //this.DataList1.DataSource = BrowseBLL.daohang(name); //this.DataList1.DataBind(); } }
//全部 protected void btnquanbu_Click(object sender, EventArgs e) { this.RP_details.DataSource = BrowseBLL.SelectDetails(); this.DataBind(); }