export to excel link
how to show export to excel link if the row number is more than 200 in ASP.NET without showing the table(with more than 200 rows) to the user?
if I put false in resultsDatagrid.Visible then the export to excel doesn't work!!!
else if (count> 200)
{
DataView view = ds.Tables[0].DefaultView;
view.Sort=e.SortExpression;
resultsDatagrid.DataSource = view;
resultsDatagrid.DataBind();
resultsDatagrid.Visible = true;
resultsLabel.Text = "More than 200 results found. Please Click the Export to Excel Link to Download the Results.";
resultsLabel.Visible = true;
exportLinkbutton.Visible = true;
}
|