How to create controls at runtime ?
Hi,
I have these tables in my databse (T1, T2 respectively).
----------------------------------------------
ContainerID | ContainerName | ParentControlID |
----------------------------------------------
10 | Panel | 20 |
----------------------------------------------
20 | Form | 0 |
----------------------------------------------
30 | Tab Control | 10 |
-----------------------------------------------
-------------------------------------
ContainerID | ControlID | ControlName |
-------------------------------------
10 | 100 | Button |
--------------------------------------
10 | 200 | TextBox |
--------------------------------------
20 | 100 | Button |
--------------------------------------
if i select a form, then respective containers must be added to that form. And respective controls must be added to the respective containers during run-time. (From Database table). Please note that the "Control Name", "Container Name" are of string type in database table.
Can you please suggest be the way to perform the task with sample code ?
Advance Thanx for your time & patience.
Cheers,
Kishore
|