TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Andy Sujoto
NA
8
19.7k
c# Eval() or compile on fly with object
Aug 19 2010 6:30 AM
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
Reply
Answers (
5
)
how to send free sms from windows application using C#
image processing