protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { BLL.ad_pos apBll = new BLL.ad_pos(); ddlAp.DataValueField = "id"; ddlAp.DataTextField = "title"; ddlAp.DataSource = apBll.GetAllList(); ddlAp.DataBind(); ddlAp.Items.Insert(0, new ListItem("全部", "0")); BindData(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.Params["id"] != null && Request.Params["id"].Trim() != "") { BLL.ad_pos apBll = new BLL.ad_pos(); ddlAp.DataValueField = "id"; ddlAp.DataTextField = "title"; ddlAp.DataSource = apBll.GetAllList(); ddlAp.DataBind(); int siId = (Convert.ToInt32(Request.Params["id"])); ShowInfo(siId); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.ad_pos apBll = new BLL.ad_pos(); ddlAp.DataValueField = "id"; ddlAp.DataTextField = "title"; ddlAp.DataSource = apBll.GetAllList(); ddlAp.DataBind(); if (Request.QueryString["type"] != null) { ddlAp.SelectedValue = Request.QueryString["type"].ToString(); } bindPos(); } }