Hello Lee,
I have solved the problem.......All I had to do is to make the "resultsDatagrid.Visible = false;" under the If else block
if (count>200)
{
DataView view = ds.Tables[0].DefaultView;
resultsDatagrid.DataSource = view;
resultsDatagrid.DataBind();
resultsDataGrid.Visible = false;
resultsLabel.Text = "More than 200 results found. Please Click the Export To Excel Link to Download the Results.";
resultsLabel.Visible = true;
exportLinkbutton.Visible = true;
}
and then again inside the exportLinkbutton_Click method (The postback) I have written "resultsDatagrid.Visible = true;" :) I am so very happy now.
private void exportLinkbutton_Click(object sender, System.EventArgs e)
{
resultsDatagrid.Visible = true;
DataGridItem tblGrid=resultsDatagrid.Items[0];
ArrayList alLinks= new ArrayList();
TableCell TC;
LinkButton LB;
.....................
...................
}
Sorry for making you frustrated(I suppose ...with my stupid questions....) and a huge Thanks for trying to help me out...it feels like I am not thanking you enough....I am really grateful to you...Have a nice day.
Last edited by skhan; July 16th, 2009 at 02:31 PM..
|