Answered by:
MetaData at Runtime

Question
-
User-1693265763 posted
I would like to be able to specify MetaData at runtime. I have a DB table that is for generic use. We store all sorts of list style data in it, but the fields are used for different purposes based on the purpose of the list and all have generic names. What I would like to do is be able to dynamically switch out what the Label and UIHint will be on the fields after I get the data from the database, based on a configuration file for that particular list.
It seems that the ability to switch the MetaData is something that is in the futures release, but I didn't see any samples of how to do it properly. Also, maybe I am barking up the wrong tree with the meta data. What about having a custom FieldTemplate that would just load the requested field template according to the schema.
Thanks,
Friday, November 21, 2008 9:28 AM
Answers
-
User-330204900 posted
In V1 of Dynamic Data the metadata con only be set as web application startup if you want to reload the metadata you will need to restart the the web application.
however if you just want to load the metadata dynamically at runtime (once only at app startup) the look at the
DynamicDataFutures0716.zip which has support for "Add metadata to objects at runtime".
Hope this helps [:D]
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, November 21, 2008 10:05 AM -
User660823006 posted
Futures: http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14475
Check out the Global.asax file. It shows metadata being added dynamically at model registration.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, November 21, 2008 10:07 AM
All replies
-
User-330204900 posted
In V1 of Dynamic Data the metadata con only be set as web application startup if you want to reload the metadata you will need to restart the the web application.
however if you just want to load the metadata dynamically at runtime (once only at app startup) the look at the
DynamicDataFutures0716.zip which has support for "Add metadata to objects at runtime".
Hope this helps [:D]
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, November 21, 2008 10:05 AM -
User660823006 posted
Futures: http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14475
Check out the Global.asax file. It shows metadata being added dynamically at model registration.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, November 21, 2008 10:07 AM -
User-1693265763 posted
Thanks. I'll take a look
Friday, November 21, 2008 10:16 AM