473,323 Members | 1,570 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,323 software developers and data experts.

JScript Eval function

Hi,

I need to use the Eval function of JScript in my C# code. I was thinking
that I could write this as a seperate JScript.NET file, compile it as a .NET
module and then later link it with my C# .NET module using AL to produce my
final asembly. But the JScript.NET compiler does not have an option to
compile code into a .NET module (it lacks the /t:module compiler option).

How do I go about doing this? Is it possible to use classes in the
Microsoft.JScript namespace to achieve the same thing?

Or, is there a C# equiv way to do this?

CGuy

Nov 15 '05 #1
2 4397
there is a /target:library option

jsc /out:some.dll /target:library some.js

"CGuy" <cg**@csharp.net> дÈëÓʼþ
news:ea**************@TK2MSFTNGP11.phx.gbl...
Hi,

I need to use the Eval function of JScript in my C# code. I was thinking that I could write this as a seperate JScript.NET file, compile it as a ..NET module and then later link it with my C# .NET module using AL to produce my final asembly. But the JScript.NET compiler does not have an option to
compile code into a .NET module (it lacks the /t:module compiler option).

How do I go about doing this? Is it possible to use classes in the
Microsoft.JScript namespace to achieve the same thing?

Or, is there a C# equiv way to do this?

CGuy

Nov 15 '05 #2
there is a /target:library option

jsc /out:some.dll /target:library some.js

"CGuy" <cg**@csharp.net> дÈëÓʼþ
news:ea**************@TK2MSFTNGP11.phx.gbl...
Hi,

I need to use the Eval function of JScript in my C# code. I was thinking that I could write this as a seperate JScript.NET file, compile it as a ..NET module and then later link it with my C# .NET module using AL to produce my final asembly. But the JScript.NET compiler does not have an option to
compile code into a .NET module (it lacks the /t:module compiler option).

How do I go about doing this? Is it possible to use classes in the
Microsoft.JScript namespace to achieve the same thing?

Or, is there a C# equiv way to do this?

CGuy

Nov 15 '05 #3

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

Similar topics

0
by: Bryan Mills | last post by:
The eval function in JScript doesn't work according to spec. Specifically, the function C() on page 73 of the ECMA-262 spec doesn't return the function object correctly under IIS 5. Binding the...
0
by: CGuy | last post by:
Hi, I need to use the Eval function of JScript in my C# code. I was thinking that I could write this as a seperate JScript.NET file, compile it as a .NET module and then later link it with my C#...
0
by: Bassem | last post by:
Hi All, I create Jscript Dll to evaluate string expression in C# program. The Jscript code : class JScriptEval { function Evaluate(evalString : String) { return eval(evalString);
2
by: moondaddy | last post by:
I'm using vb.net and have an aspx page where I want to call a function in the code behind to do something on the backend and I want to call this function from a jscript function in the aspx page. ...
0
by: ttomic | last post by:
I have asp.net application written in jscript. On POST request, during Page_Load, I receive string which I evaluate using jscript eval method. String looks like: my_fun("arg") where my_fun is...
3
by: Mitch Freed | last post by:
I have been using the JScript eval() method from C# to evaluate conditional logic at run-time. I found that implementing a solution similar to the example posted at:...
3
by: bowser | last post by:
Hello, I have a problem of communication between JScript and C#. I must say that I'm new to both. In a JS file I have to call a C# function. In particular I have: public function Eval(expr :...
1
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
3
by: suganya | last post by:
Hi Some professionals already has developed the project using menu. In my company, they have given me task to clear the error in that. It is a script file named as "menubarAPI4.js" which is kept...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.