server.execute with variables attached

Results 1 to 3 of 3

Thread: server.execute with variables attached

  1. #1
    Dvorak Guest

    Default server.execute with variables attached

    I need to do this:<BR><BR>server.execute "somepage.asp?action=this"<BR><BR>But the server.execute method does not like the form and it generates an error.<BR><BR>Is there another way to do this? I have to use server.execute and I have to pass a variable to the executed page. I would rather not use a session variable either.<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: server.execute with variables attached

    You can&#039;t post to code using the server.execute method. All this method does, is instructs IIS to go and run that code where it sees that command. It is an alternative to an include file.<BR><BR>You can&#039;t post to an include file the same way you can&#039;t post to the execute command.<BR><BR>Why is it so essential to use Server.Execute and what is wrong with session variables??

  3. #3
    Dvorak Guest

    Default RE: server.execute with variables attached

    I have a reference book(ASP Unleashed) that says that the only way to pass variables between the calling page and the executed page, when using server.execute, is via either:<BR><BR>1) Session Variable<BR>2) Application Variable<BR>3) QueryString<BR><BR>And I just wanted to use the QueryString method instead of the other two. It must be a misprint, though. I cannot get a server.execute statement to work when "?" is appended to the relative URL of the executed page.<BR><BR>I have decided to use the Application variable to pass the variables to the executed page, barring any QueryString solution you may have that works.<BR><BR>As to why I have to use the execute method, this situation calls for a "dynamic include", which server.execute can facilitate.<BR><BR>server.execute myVar

Posting Permissions

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