Evaluate a String that contains code
Is there a way to evaluate a string that contains code. I am wanting to store "Meta Data" in a database and then when the data is read out I want it to be evalulated before the result is rendered. For example lets say I have an onclick event stored in the database. The value of the onclick event is toggle('Car.Engine') where Car.Engine is an accessible object. How can I make the compiler eval the string before it puts the value in the toggle function?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Roei BarRank #1,271 · 1.4K reputationPosted Aug 19, 2009, 11:31 PM EDT
either you place add the onclick event on the serverside like
divElement.Attributes.Add("onclick",
or you can use #Eval
on the ClientSide while the #Eval will go to the Property in the server in which you will bring up the value needed
dont forget to mark this as "Accepted Answer" if you liked it