protected void ddlRegion_SelectedIndexChanged(object sender, EventArgs e) { Place pl = new Place(); string reg = ddlRegion.SelectedItem.Value; regionList = pl.SelectByRegion(reg); DatalistRegion.DataSource = regionList; DatalistRegion.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack == false) { Place pl = new Place(); ratingList = pl.GetTop3Rating(); DatalistRating.DataSource = ratingList; DatalistRating.DataBind(); string reg = ddlRegion.SelectedItem.Value; regionList = pl.SelectByRegion(reg); DatalistRegion.DataSource = regionList; DatalistRegion.DataBind(); } }