Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
c# Eval() or compile on fly with object
Andy Sujoto
Aug 19 2010 6:30 AM
15.2k
Reply
Hi,
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 object 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,
Andy
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
how to send free sms from windows application using C#
image processing