int numcells = 2;
foreach (System.IO.FileInfo fi in fileQuery)
{
Label1.Text = fileList.Count().ToString();
TableRow r = new TableRow();
for (int i = 0; i < numcells; i++)
{
if (i.Equals("0"))
{
TableCell c = new TableCell();
c.Controls.Add(new LiteralControl(fi.Name.ToString()));
r.Cells.Add(c);
}
if (i.Equals("1"))
{
TableCell c = new TableCell();
c.Controls.Add(new LiteralControl(Server.MapPath(strheadlinesid).ToString() + fi.Name.ToString()));
r.Cells.Add(c);
}
Table1.Rows.Add(r);
}
I tried with the above code to print file name and and its path in the table.
But for some reason it's not printing the table.
Is there any wrong in the syntax.
Please let me know the wrong in the code if anyone finds it.