C
Code Blue
Hi,
In C#, is it possible to obtain an object reference from a string
representation of the object's name?
for example, if I have a TableName = "TblName", and the dataAdapter
associated with that table is called "daTblName", however, I will not know
the TableName till run time.
so at run time, the user will have 20 tablenames to choose from on a page,
and I will pass the chosen table name as a QueryString
(Table.aspx?tablename="TblName"), so I don't have a reference to the data
adapter referring to this particular table, but I know the data adapter's
name.
Is it possible, knowing that the data adapter's object name, to get a
reference to it at run time, perhaps by using Reflection?
Thanks,
CB
In C#, is it possible to obtain an object reference from a string
representation of the object's name?
for example, if I have a TableName = "TblName", and the dataAdapter
associated with that table is called "daTblName", however, I will not know
the TableName till run time.
so at run time, the user will have 20 tablenames to choose from on a page,
and I will pass the chosen table name as a QueryString
(Table.aspx?tablename="TblName"), so I don't have a reference to the data
adapter referring to this particular table, but I know the data adapter's
name.
Is it possible, knowing that the data adapter's object name, to get a
reference to it at run time, perhaps by using Reflection?
Thanks,
CB