I have a program (aspx) that will receive a parameter, based on the parameter, this program will get all required data from server. within the data, it contains a lot of object (that should be created) along with it properties (that should be set). for creating object on fly, i found no issue, however, when came to setting its properties, i don't know how to make it works.
I have tried using CodeDomProvider to compile the code on fly and get the value returned, like :
string sEval = "1+1", will always return 2.
However when i try to use the same concept on objects like example below, i got an error :
I have a webform with 3 textbox on it, named Label1, Label2, Label3.
Label1.Text = "my first name"
Label2.Text = " my family name"
string sEval = "Label3.Text = Label1.Text + Label2.Text"
now i want to run sEval that will fill Label3.Text = "my first name, my family name".
how to achieve that? please help.
Thanks in advance,