Hi,
Normally, the script which will open the modal popup executes on client click of the button specified as the Target Control ID for the extender.
Here if you want to show the report as when the popup opens, then you can place the code which is in
button click
function, in some other place like
Page Load
or some other event which will occur before the user clicks on the button.
try like this.
if(!IsPostBack)
{
BLL bl = new BLL();
DataSet ds = bl.GetTrainingRecords(txtEmpId.Text);
DataTable dt = new DataTable();
dt = ds.Tables[0];
string reportPath = @"D:\HRPortal\Training\Report.rdlc";
ReportDataSource rds = new ReportDataSource
("TrainingRecord_TRdt", dt);
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(rds);
ReportViewer1.LocalReport.ReportPath = reportPath;
ReportViewer1.ZoomPercent = 100;
ReportViewer1.LocalReport.Refresh();
}
and remove the post back and onclick event for button.
Hope it works.