Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    187
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Templates using include and server.execute()

    Ok so you can use an include file for template purposes which works well, and you can pass varibles between the include file, because, it merges the two files before execution and you can execute external documents using server.execute and them merge the files together. So obviusly they can both be used for templates. Both of them have their advantages and disadvantages, i was wondering if there was of passing varibles to and from a page being executeded using "server.execute"? any ideas?

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    When Server.Execute is executed by the server, the page context remains the same, meaning you can still access the same Request object as if you were in the calling page. I think you can still access the global variables declared in the calling page from the target page. The overall effect is very similar to a function or subroutine call.

  • #3
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A page "included" using Server.Execute will not have access to variables set in the calling page.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •