Im trying to print out all selected checkbox
My gridview was selecting and I changed it to checkbox now its not working
THIS WAS THE OLD CODE WHICH WAS SELECTING:
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
Session["AreaId"] = -1;
}
protected void ButtonPrint_Click(object sender, EventArgs e)
{
try
{
Session["FromURL"] = "~/Reports/SpaceUtilised.aspx";
Session["ReportName"] = "Space Utilised";
Microsoft.Reporting.WebForms.ReportParameter[] RptParameters = new Microsoft.Reporting.WebForms.ReportParameter[5];
string strReportConnectionString = Session["ReportConnectionString"].ToString();
RptParameters[0] = new Microsoft.Reporting.WebForms.ReportParameter("ConnectionString", strReportConnectionString);
RptParameters[1] = new Microsoft.Reporting.WebForms.ReportParameter("WarehouseId", Session["WarehouseId"].ToString());
RptParameters[2] = new Microsoft.Reporting.WebForms.ReportParameter("AreaId", Session["AreaId"].ToString());
RptParameters[3] = new Microsoft.Reporting.WebForms.ReportParameter("ServerName", Session["ServerName"].ToString());
RptParameters[4] = new Microsoft.Reporting.WebForms.ReportParameter("DatabaseName", Session["DatabaseName"].ToString());
Session["ReportParameters"] = RptParameters;
Response.Redirect("~/Reports/Report.aspx");
}
catch { }
}
protected void CheckBoxAll_OnCheckedChanged(object sender, EventArgs e)
{
if (CheckBoxAll.Checked)
{
Session["AreaId"] = -1;
AreaSearch1.Visible = false;
}
else
AreaSearch1.Visible = true;
}
}
Then I had to change it to checkbox because I want to be able to select multiple rows