JScript.NET eval function in ASP.NET

S

shripaldalal

Hi,

We have to quickly port our legacy ASP code to ASP.NET and we know
both of these technologies are totally different. But we still have to
extensively make use of the Execute function because lot of business
logic is punched in by the client himself. I have recently come to
know it's not possible in C# or VB.NET since they are compiled
languages.

Though this is possible in JScript .NET using the eval function (we
tried and it works very well), they say JScript .NET is not even
supported in VS 2008..... Is JScript .NET headed the Classic ASP way ?
Is it going to die a slow death...will support will be discontinued by
Microsoft ? There are no examples for JScript.NET code. If yes, I will
have to seriously reconsider porting to .NET ??? We cannot afford to
remove client scripted code because our whole app depends on it....

If no, then it solves all our problems and this is exactly what I
want....We can use JScript.NET.....

BTW can JScript.NET using the eval function in ASPX pages be compiled
by ASPNET_Compiler.EXE ? for source code protection reasons.....

Thanks.

Shripal D.
 
G

Gregory A. Beamer

You can still use eval and execute, if you are dealing with client side
code. If your client is injecting code on the server, you are better to look
at Reflection. With the Emit() function, you have the power to create code
at run time and even run it. I am not sure whether or not that is an option
for you.
 
B

bruce barker

its hard to guess the future of javascript.net. it never got ide
support, was always had a small development team. there is even a new
javascript language (managed jscript) based on the dlr. i'd probably
pick managed javascript or f#.

you could also use the codedom to compile at runtime the code snippets
if they do not change at lot at runtime. the only problem with this
approach is code can not be unloaded (unless you use a separate
appdomain), so generally after compiling and loading code, you want to
keep a handle to it.

-- bruce (sqlwork.com)
 

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

Members online

Forum statistics

Threads
473,771
Messages
2,569,587
Members
45,099
Latest member
AmbrosePri
Top