I Need EVAL() in VB.NET

Ramius

Senior member
Feb 13, 2001
318
0
0
I have to dynamically edit properties of a textbox in VB.NET. Except I have many rows of this textbox and it's IDs are similar to "tbox_1", "tbox_2", etc..

This is what I want to do:
(i = a normal looping integer)
Eval("tbox_" & i & ".Text = " & Parameter.value)

Since VB.NET doesn't have Eval()...I'm stuck. I know JSCRIPT has an Eval(), can I call a JSCRIPT function from a .vb file? Can I manually create an Eval() in VB.NET?

Thanks, I'm going nuts searching for an example.

~Ramius
 

Moonbender

Golden Member
Oct 19, 2000
1,046
0
0
Take what I say with a grain of salt, I'm not studying this yet, and I've never used VB.NET! Anyway, I think, since VB.NET is a compiled language (even if it's only metacode that's created), as opposed to a scripting language like JavaScript, PHP and Perl, there is no eval statement.
It's not a problem for a scripting language to evaluate a string as code on demand - that's what script interpreters do all the time, anyway. But in a language like VB.NET, or C or Delphi, the string code is compiled one time and after that there's no way to interpret a string as instructions - unless you deliver the actual compiler with the program.

Anyway, as I said I don't know VB.NET (I used to program in vanilla VB, though), but this does look like an obvious candidate for an array of textboxes, ie tbox[0], tbox[1] and so on.
 

Ramius

Senior member
Feb 13, 2001
318
0
0
Thanks and I hear what you are saying, but I've researched and found that I can import the JSCRIPT.NET class and use its functions as long as I do a few things:
1) Import Microsoft.JSCRIPT into my .ASPX files.
2) Make the EVAL() function public to other classes
3) Make sure the dlls that get compiled are in the right locations so the page can find a reference to the EVAL function of the JSCRIPT class.
4) I'm sure a few others

So the JSCRIPT class will be compiled into a dll that my .vb files can access given they have imported the JSCRIPT class...I just haven't been able to get it to work.
 

Moonbender

Golden Member
Oct 19, 2000
1,046
0
0
Well, sounds like an awful lot of work if you could just use an array instead. OTOH, maybe I'm wrong and you can't.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |