ASPX Server.Execute call

Discussion in 'OT Technology' started by teo, May 27, 2006.

  1. teo

    teo . => ? => !

    Joined:
    Aug 26, 2004
    Messages:
    3,094
    Likes Received:
    0
    Location:
    Eh?
    Anyone have any experience with this?

    I'm considering using it to call a page that would normally be called using Response.Redirect - however, I want control returned to the calling page. I also want to suppress and/or capture the output that the target page produces. Does anyone have any in-depth information on how this call works (or have a good link to a page that explains it)?

    Thx in advance. :)

    edit: Most of the pages I've found online just explain the basics of the call - I'm looking for something more detailed. Also, this isn't homework in case anyone's curious.
     
  2. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    (it's been a while since I've worked with ASP)

    iirc, Server.Execute('path/to/file') will execute that page, and return control to the calling page. It has several advantages. One being that it can happen conditionally (within a select or if statement). Another being that it gets passed the same input as the calling page. So a GET or POST variable is still accessible. However, the output is printed directly, and is not returned for processing by assignment.
     
  3. hsmith

    hsmith OT Supporter

    Joined:
    Feb 24, 2002
    Messages:
    124,553
    Likes Received:
    632
    Location:
    Your mother.
  4. teo

    teo . => ? => !

    Joined:
    Aug 26, 2004
    Messages:
    3,094
    Likes Received:
    0
    Location:
    Eh?
    If you're asking me why, it's because I want to intercept a page that would normally take some values for processing and return a 'thank-you' page, which I want to replace with my own. Hence the need to suppress/capture the output.
     
  5. teo

    teo . => ? => !

    Joined:
    Aug 26, 2004
    Messages:
    3,094
    Likes Received:
    0
    Location:
    Eh?
    Thanks.
     

Share This Page