Stopping running code at a certain point

Discussion in 'ASP General' started by Jack, Mar 9, 2005.

  1. Jack

    Jack Guest

    Hi,
    I have a asp page which is pretty long. This consitst of various recordsets.
    My intention is to stop execution of a code at a cetain point and test one
    value prior to this point. Is there any way to do this? Thanks in advance.
    Regards.
     
    Jack, Mar 9, 2005
    #1
    1. Advertising

  2. Jack

    McKirahan Guest

    "Jack" <> wrote in message
    news:...
    > Hi,
    > I have a asp page which is pretty long. This consitst of various

    recordsets.
    > My intention is to stop execution of a code at a cetain point and test one
    > value prior to this point. Is there any way to do this? Thanks in advance.
    > Regards.


    An "If" statement comes to mind as in:

    If item = value Then
    ' do something
    End If

    Perhaps a more detailed description of the issue would suggest a different
    answer.

    What do you mean by "stop execution of the code"?

    Will this require user interaction?
     
    McKirahan, Mar 9, 2005
    #2
    1. Advertising

  3. Jack

    Vic Sowers Guest

    "Jack" <> wrote in message
    news:...
    > Hi,
    > I have a asp page which is pretty long. This consitst of various
    > recordsets.
    > My intention is to stop execution of a code at a cetain point and test one
    > value prior to this point. Is there any way to do this? Thanks in advance.
    > Regards.


    Try:
    Response.End();
    after you've completed testing the value.
     
    Vic Sowers, Mar 9, 2005
    #3
  4. Jack

    Jack Guest

    Thanks McKirahan for your answer. Actually, I need to log into the system.
    That is the only user interaction. I would like to check couple of values of
    variables which are in the middle of the code. Just after this, the code is
    giving error. I was wondering if I could open the web page and the code would
    run upto this point of extracting the values of couple of variables and not
    execute any further which, at this point, if runs, will give me error in the
    page. Hope I am clear.
    I am going to test Vic's suggestion, to see if that works. Regards.

    "McKirahan" wrote:

    > "Jack" <> wrote in message
    > news:...
    > > Hi,
    > > I have a asp page which is pretty long. This consitst of various

    > recordsets.
    > > My intention is to stop execution of a code at a cetain point and test one
    > > value prior to this point. Is there any way to do this? Thanks in advance.
    > > Regards.

    >
    > An "If" statement comes to mind as in:
    >
    > If item = value Then
    > ' do something
    > End If
    >
    > Perhaps a more detailed description of the issue would suggest a different
    > answer.
    >
    > What do you mean by "stop execution of the code"?
    >
    > Will this require user interaction?
    >
    >
    >
     
    Jack, Mar 9, 2005
    #4
  5. Jack

    McKirahan Guest

    "Jack" <> wrote in message
    news:...
    > Thanks McKirahan for your answer. Actually, I need to log into the system.
    > That is the only user interaction. I would like to check couple of values

    of
    > variables which are in the middle of the code. Just after this, the code

    is
    > giving error. I was wondering if I could open the web page and the code

    would
    > run upto this point of extracting the values of couple of variables and

    not
    > execute any further which, at this point, if runs, will give me error in

    the
    > page. Hope I am clear.
    > I am going to test Vic's suggestion, to see if that works. Regards.


    Use
    Response.Write(variable_name)
    before
    Response.End
    to view variable_name at the point of termination

    If you use it multiple times. use:
    Response.Write("<br>variable_name = " & variable_name)
     
    McKirahan, Mar 9, 2005
    #5
  6. Jack

    Jack Guest

    Thanks for your input McKirahan. Regards.

    "McKirahan" wrote:

    > "Jack" <> wrote in message
    > news:...
    > > Thanks McKirahan for your answer. Actually, I need to log into the system.
    > > That is the only user interaction. I would like to check couple of values

    > of
    > > variables which are in the middle of the code. Just after this, the code

    > is
    > > giving error. I was wondering if I could open the web page and the code

    > would
    > > run upto this point of extracting the values of couple of variables and

    > not
    > > execute any further which, at this point, if runs, will give me error in

    > the
    > > page. Hope I am clear.
    > > I am going to test Vic's suggestion, to see if that works. Regards.

    >
    > Use
    > Response.Write(variable_name)
    > before
    > Response.End
    > to view variable_name at the point of termination
    >
    > If you use it multiple times. use:
    > Response.Write("<br>variable_name = " & variable_name)
    >
    >
    >
     
    Jack, Mar 9, 2005
    #6
    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:
    661
  2. Jon Delano
    Replies:
    3
    Views:
    554
    Jon Delano
    May 19, 2006
  3. Saraswati lakki
    Replies:
    0
    Views:
    1,349
    Saraswati lakki
    Jan 6, 2012
  4. Brad Walton

    Format - stopping at certain page

    Brad Walton, Jan 20, 2005, in forum: Perl Misc
    Replies:
    0
    Views:
    90
    Brad Walton
    Jan 20, 2005
  5. brian
    Replies:
    4
    Views:
    117
Loading...

Share This Page