protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataSet recommendds = Btrend.GetList(); Dlrecommand.DataSource = recommendds; Dlrecommand.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int Newsid = Int32.Parse(Request.QueryString["id"].Trim()); StringBuilder sb = new StringBuilder(); sb.Append("ID="); sb.Append(Newsid); DataList1.DataSource = t.GetList(sb.ToString()); DataList1.DataBind(); } }