eval function invb.net??

G

Garg

Hi,

Could anybody please tell me how do I translate this line of code into
vb.net??
I am having problem with this eval function. What is the equivalent of
eval function in vb.net?

str1= (eval("strCallsDef" + document.all("lstPeriodType1").value))
 
A

Alexey Smirnov

Hi,

Could anybody please tell me how do I translate this line of code into
vb.net??
I am having problem with this eval function. What is the equivalent of
eval function in vb.net?

str1= (eval("strCallsDef" + document.all("lstPeriodType1").value))

Do you want to convert client side javascript into VB.NET?

Your idea will not work.
 
G

Garg

Actually. i am working on conversion of asp code to vb.net.
i do not know what is the equivalent of eval function in vb.net?
In case u know, then please help me....
 
M

Mark Rae

Actually. i am working on conversion of asp code to vb.net.
i do not know what is the equivalent of eval function in vb.net?
In case u know, then please help me....

You *really* need to get hold of a beginner's guide to ASP.NET...

ASP / VBScript bears almost no relationship to ASP.NET / VB.NET

Without this, you're going to come up against many more fundamental
differences than the one you're currently having trouble with...
 
P

Patrice

Even if possible (I believe you can call the J# assembly to do so, this
would also dable by doing dynamic code compilation though some host likely
won"t allow this) it would be IMO interesting to tell what you are trying to
do.

My personal preference would be to use an array...
 
P

Patrice

.... And assuming what you want is to port client side code to server side
(is this what you are doing ?). document.all obviously won't work server
side, you'll have to use the approporiate control to get the value server
side...
 
G

Garg

I only want to know is there any function in vb.net which has the same
functionality as the eval function????

If yes, then please tell me....
 
A

Alexey Smirnov

Actually. i am working on conversion of asp code to vb.net.
i do not know what is the equivalent of eval function in vb.net?
In case u know, then please help me....

This str1= (eval("strCallsDef" +
document.all("lstPeriodType1").value)) is not ASP

This is a JavaScript.
 
G

Guest

Actually i realized you one can use Javascript as script language in asp
files instead of default vbscript :)
 
M

Mark Rae

Actually i realized you one can use Javascript as script language in asp
files instead of default vbscript :)

You can also use VBScript as client-side scripting in classic ASP if you
don't care about alienating the non-IE community...
 
A

Alexey Smirnov

Actually i realized you one can use Javascript as script language in asp
files instead of default vbscript :)

I think so, however the document.all("lstPeriodType1").value is
something from the client-side scripting, which is a bit different
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top