Is this possible?, regarding Tables

Mar 23 2006 2:55 AM

I have ten tables on a form, all tables are run at server, what i want to do is instead of creating ten if statements to check if the tables are visible i want to create a while loop and then use a var to move from one table to the next. My tables are named tbl1, tbl2, tbl3 etc. eg

int x = 1;

string tablename = "tbl";

while (x < 10)
{
tablename = tablename + x;
 if (tablename.Visible == true)
{
//do something
}
x = x + 1
}

Can someone please help me, please bear in mind, i am still classified as a junior, so keep the code relatively simple....please.

Thanks
Shane


Answers (1)