Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > EXECUTE statement in ASP.NET

Reply
Thread Tools

EXECUTE statement in ASP.NET

 
 
shripaldalal@gmail.com
Guest
Posts: n/a
 
      01-29-2009
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.
 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      01-29-2009
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)

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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.

 
Reply With Quote
 
 
 
 
shripaldalal@gmail.com
Guest
Posts: n/a
 
      01-29-2009
On Jan 29, 8:00*pm, "Mark Rae [MVP]" <(E-Mail Removed)> wrote:
> <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
> > 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

>
> 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-Du.../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...
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.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.
 
Reply With Quote
 
Patrik
Guest
Posts: n/a
 
      01-29-2009
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


On 29 Jan, 19:21, "Mark Rae [MVP]" <(E-Mail Removed)> wrote:
> <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
> > Is there no C# eval function?

>
> No - C# is a compiled language...
>
> > or a .NET assembly or something that can help?

>
> You might be able to use Reflection for this, but I can't recommend it...http://www.codeproject.com/KB/cs/evalcscode.aspx
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: MySQL JDBC hangs execute() with multi-statement UPDATE! Roedy Green Java 1 08-22-2005 09:16 PM
Which of switch statement and if-else statement takes less time to execute? swaroophr@gmail.com C Programming 21 08-02-2005 09:24 AM
How to execute a command prompt statement using Java Sharp Java 2 02-04-2005 01:26 PM
Can i execute aspx file in my asp pag with server.execute method(sorry) Savas Ates ASP General 1 08-17-2004 04:52 PM
execute the statements inside if statement without testing the if expression? Matt Java 3 03-01-2004 08:57 PM



Advertisments