EXECUTE statement in ASP.NET

Discussion in 'ASP .Net' started by shripaldalal@gmail.com, Jan 29, 2009.

  1. Guest

    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.
     
    , Jan 29, 2009
    #1
    1. Advertising

  2. bruce barker Guest

    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)

    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.
     
    bruce barker, Jan 29, 2009
    #2
    1. Advertising

  3. Guest

    On Jan 29, 8:00 pm, "Mark Rae [MVP]" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > 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-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...
    >
    > --
    > 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.
     
    , Jan 29, 2009
    #3
  4. Patrik Guest

    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]" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > 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
     
    Patrik, Jan 29, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    403
  2. Replies:
    2
    Views:
    1,883
  3. Replies:
    21
    Views:
    1,086
    Giannis Papadopoulos
    Aug 2, 2005
  4. Matt

    execute sql count statement in asp

    Matt, Jan 11, 2004, in forum: ASP General
    Replies:
    1
    Views:
    197
    Ray at
    Jan 11, 2004
  5. Savas Ates
    Replies:
    1
    Views:
    304
    Patrice
    Aug 17, 2004
Loading...

Share This Page