I have a string stored in database as 'GridColumn1.Caption = "XYZ"'
Is there a way to execute this code in runtime (on windows form load) to set GridColumn1's Caption property to "XYZ" in vb.net or in c#?
I want to read it from db on form load and set the captions and texts.
Thanks in advance.
Yes you can! You can use the
Microsoft.CSharp.CSharpCodeProvider
to compile and execute code during runtime.More information can be found in the answers to this question.