473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

eval function invb.net??

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))

Feb 19 '07 #1
13 1724
On Feb 19, 11:26 am, "Garg" <shivaniga...@gmail.comwrote:
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.

Feb 19 '07 #2

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....

Feb 19 '07 #3
That's what i suspected, he's treating asp.net as another client script :(
--
Milosz
"Alexey Smirnov" wrote:
On Feb 19, 11:26 am, "Garg" <shivaniga...@gmail.comwrote:
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.

Feb 19 '07 #4
"Garg" <sh**********@gmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
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...
Feb 19 '07 #5
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...
"Garg" <sh**********@gmail.coma écrit dans le message de news:
11**********************@p10g2000cwp.googlegroups. com...
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))

Feb 19 '07 #6
.... 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...

"Patrice" <http://www.chez.com/scribe/a écrit dans le message de news:
uT**************@TK2MSFTNGP03.phx.gbl...
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...
"Garg" <sh**********@gmail.coma écrit dans le message de news:
11**********************@p10g2000cwp.googlegroups. com...
>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))


Feb 19 '07 #7
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....

Feb 19 '07 #8
On Feb 19, 12:21 pm, "Garg" <shivaniga...@gmail.comwrote:
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.

Feb 19 '07 #9
Actually i realized you one can use Javascript as script language in asp
files instead of default vbscript :)

--
Milosz
"Alexey Smirnov" wrote:
On Feb 19, 12:21 pm, "Garg" <shivaniga...@gmail.comwrote:
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.

Feb 19 '07 #10
On Feb 19, 2:11 pm, Milosz Skalecki [MCAD] <mily...@DONTLIKESPAMwp.pl>
wrote:
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

Feb 19 '07 #11
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plwrote in message
news:24**********************************@microsof t.com...
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...
Feb 19 '07 #12
So the short answer is no.

"Garg" <sh**********@gmail.coma écrit dans le message de news:
11*********************@k78g2000cwa.googlegroups.c om...
>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....

Feb 19 '07 #13
Definitely agree, but wasn't clear what was going on :)
--
Milosz
"Mark Rae" wrote:
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plwrote in message
news:24**********************************@microsof t.com...
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...
Feb 19 '07 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Paddy | last post by:
Hi, I got tripped up on the way eval works with respect to modules and so wrote a test. It seems that a function carries around knowledge of the globals() present when it was defined. (The...
9
by: HikksNotAtHome | last post by:
This is a very simplified example of an Intranet application. But, is there an easier (or more efficient) way of getting the decimal equivalent of a fraction? The actual function gets the select...
12
by: knocte | last post by:
Hello. I have always thought that the eval() function was very flexible and useful. If I use it, I can define functions at runtime!! However, I have found a case where eval() does not work...
18
by: Joe Fallon | last post by:
I have some complex logic which is fairly simply to build up into a string. I needed a way to Eval this string and return a Boolean result. This code works fine to achieve that goal. My...
3
by: Pauljh | last post by:
Hi All, I'm running some javascript over a server side generated web page and have multiple generated empty select statements, that I want to populate when the page is loaded. As HTML doesn't do...
6
by: vasudevram | last post by:
Hi group, Question: Do eval() and exec not accept a function definition? (like 'def foo: pass) ? I wrote a function to generate other functions using something like eval("def foo: ....") but...
2
by: Florian Loitsch | last post by:
hi, What should be the output of the following code-snippet? === var x = "global"; function f() { var x = 0; eval("function x() { return false; }"); delete x; alert(x); }
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
10
by: Gordon | last post by:
I have a script that creates new objects based on the value of a form field. Basically, the code looks like this. eval ('new ' + objType.value + '(val1, val2, val3'); objType is a select with...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.