1
Answer

Calling a user control dynamically.

kchoms

kchoms

18y
3.6k
1
Hello,
I need to know how to access the user controls dynamically.
There is a drop down list with the name of the forms. If the user selects a form and hits submit some user controls should be displayed based on the selected form.

There is a table which contains the Form Name. name of user control and the order in which they should appear. Based on this table can i call the user controls and place them in the screen. Please let know how this can be done?

Thanks
Sowmya
Answers (1)
1
Jignesh Trivedi

Jignesh Trivedi

NA 61k 14.2m 10y

Hi,

No
Each model does not become a DB table, If you decorated them with "Table" attribute or define dbset property in context class then it become DB table.

Generally db table name and column name is same as model class name and properties name but we can change also.

Please refer
https://msdn.microsoft.com/en-us/magazine/hh126815.aspx

hope this will help you.

1
Suraj Sahoo

Suraj Sahoo

NA 10.2k 922.3k 10y
Follow the below link for better understanding.
http://www.google.co.in/url?q=http://www.entityframeworktutorial.net/code-first/entity-framework-code-first.aspx&sa=U&ei=z6rbVIn4A4zluQT6poHgBg&ved=0CAsQFjAA&usg=AFQjCNHXrGApef8mPSHLY8B5kkpoArcnLQ
What happens is you create a class with properties and you specify the id or primary key with key attribute. Thus when enable migration is done it creates the migration which picks the classes and its properties and on update database the tables are created based on the connection strings.
accept if helps
thanks
0
Rollin Shultz

Rollin Shultz

NA 5 631 10y
Thank you Suraj and Jignesh, I will study your suggestions.