Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











METHOD:  Server.Execute

Implemented in version 3.0

Server.Execute(Path)

The Execute method allows you to call another ASP page from inside an ASP page. When the called ASP page completes its tasks, you are then returned to the calling ASP page. The overall effect is very similar to a function or subroutine call. Any text or output from the called ASP page will be displayed on the calling ASP page. The Execute method is a more useful alternative to using server-side includes.

In contrast, the Transfer method allows you to transfer from one ASP page to another without returning to the calling ASP page.

There is one mandatory argument.

Path

The Path argument is a string specifying either the absolute or relative path of the ASP page being called. The file name must be included in the path. The entire Path must be enclosed inside a pair of quotes. The Path argument cannot include a query string, however, any query string that was available to the calling ASP page will be available to the called ASP page.

Code:
----------CallingAsp.asp----------
<HTML>
<BODY>

How now <%Server.Execute("CalledAsp.asp")%> cow?

</BODY>
</HTML>

----------CalledAsp.asp----------
<%
Response.Write "pink"
%>

Output:
How now pink cow?
 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information