后台
protected void Page_Load(object sender, EventArgs e) { ScriptManager1.RegisterAsyncPostBackControl(btnSearch);//给按钮注册异步事件 } protected void btnSearch_Click(object sender, EventArgs e) { string vehicleLic = this.tbVehicleLic.Text; double timeSpan = Convert.ToDouble(this.tbTimeSpan.Text); string lineID = "164,165,166,167"; MainBLL bll = new MainBLL(); var dt = bll.GetBusStatusByLineID(lineID, vehicleLic, timeSpan); ReportDataSource ReportData = new ReportDataSource("DataSet1", dt); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(ReportData); //this.UpdatePanel1.Update(); }