EXECUTE statement in ASP.NET

S

shripaldalal

Hi,

We have an execute statement in ASP which can be used to execute
scripts or code. Do we have a similar statement in ASP.NET ? I know it
is compiled code, but is there some way around it ? I need this
function because I extensively make use of it. Thanks.

VBScript:

Dim A
Execute "A = 10"
Response.write A

Output: 10

Regards,
Shripal.
 
B

bruce barker

execute was a vbscript language feature, not asp feature. neither vb.net
or c# have this feature but other .net languages do: javascript, ruby,
python, and f# to name a few.

if you want to do dynamic code, switching to ruby might be a good idea,
and will most be like old asp. also the new dynamic data controls work
much better with ruby than c# or vb.net.

-- bruce (sqlwork.com)
 
S

shripaldalal

Please don't take this the wrong way, but you need to stop what you're doing
immediately.

ASP.NET is *TOTALLY DIFFERENT* from ASP Classic and, if you're just moving
up to it, the biggest mistake you can make is to assume that ASP.NET is
somehow the "next version" of ASP Classic. It isn't - not even close...

Firstly, I would advise you to purchase this:http://www.amazon.com/ASP-NET-3-5-Dummies-Computer-Tech/dp/0470195924...
and download the code samples directly from the author's website:http://www.kencox.ca/

Secondly, I would advise you to work your way through it from beginning to
end.

Thirdly, I would advise you to forget everything you ever knew about ASP
Classic - almost none of it will be of any use to you in ASP.NET...

Buddy,

I already own that book :)

And I know ASP.NET is totally different. But I require something like
this because our company is rewriting an ASP app completely ground up
in C#.NET (ASP.NET) and everything is fine other than this... Our old
app extensively makes use of this vbscript "execute" statement... We
cannot find a replacement or a "different" way to do this. We require
lot of code to be kept in a database (which can be dynamically changed
by the client's technical ppl) which will be executed by this
statement at run time. If I cannot get this in .NET i might as well
leave it.

Is there no C# eval function ? or a .NET assembly or something that
can help ? any third party .NET components ?

Best regards,
Shripal.
 
P

Patrik

The time is on your side.

I listened to a speech with Anders Hejlsberg where he talked about C#
5.0 where he said it would be possible to create (and run) code at run-
time.

///Patrik
 

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