please dont rip this site
Platform SDK: IIS SDK
      [IIS 5.0] [IIS 5.1] [IIS 6.0]

Server.Execute

The Execute method calls an .asp file, and processes it as if it were part of the calling ASP script. The Execute method is similar to a procedure call in many programming languages.

Syntax

Server.Execute( Path)

Parameters

Path
A string specifying the location of the .asp file to execute. The Path parameter may be for either an absolute or a relative path. If Path is absolute, it must map to an ASP script in the same application as the calling .asp file. Path can be a string variable name that is set at run-time. The Path parameter must not contain a query string, or IIS returns an error.

Remarks

The Server.Execute method provides a way of dividing a complex application into individual modules. By employing the Server.Execute method, you can develop a library of .asp files that you can call as needed. This approach is an alternative to server-side include directives. The major difference is that you can dynamically call an .asp file by using Server.Execute.

After IIS processes the .asp file specified in the input parameter to Server.Execute, the response is returned to the calling ASP script.

The following collections and properties are available to the executed ASP page:

If a file is included in the calling page by using #include, the executed .asp will not use it. For example, you may have a subroutine in a file that is included in your calling page, but the executed .asp will not recognize the subroutine name. You must include the file in each executed .asp that requires the subroutine.

If either the calling or called .asp file contains a transaction directive, the status of the transaction will apply to the .asp file that contains the directive. For example, if ASP1 below calls ASP2 and the transaction is aborted while ASP2 is being processed, the ASP2 OnTransactionAbort (if present) is called. After ASP2 completes processing, the ASP1 OnTransactionAbort (if present) is called. The following code demonstrates this.

ASP1:

<%@ Transaction=Required %>

<% 

  Server.Execute ("ASP2.asp") 

  Sub OnTransactionAbort

  Sub OnTransactionCommit

%>



ASP2.asp:

<%@ Transaction=Required %>

<%

  Sub OnTransactionAbort

  Sub OnTransactionCommit

%>

Example

In the following example, the browser language determines which .asp file is executed. (Languages with multibyte characters have not been included in this example because of codepage incompatibilities.) The output from these scripts on a U.S. system is:

Company Name
Welcome to my website!

The output from these scripts on a German system is:

Company Name
Willkommen zu meinem website!

The output from these scripts on a Spanish system is:

Company Name
Recepción a mi website!

--- Welcome.asp ---



<HTML>

<BODY>

<H1>Company Name</H1>

<%

  AcceptLang =index.html Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

  Lang = Left(AcceptLang, 2)

  Server.Execute(Lang & "Welcome.asp")

%>

</BODY>

</HTML>

--- EnWelcome.asp ---



<% Response.Write "Welcome to my website!" %>

--- DeWelcome.asp



<% Response.Write "Willkommen zu meinem website!" %>

--- EsWelcome.asp ---



<% Response.Write "Recepción a mi website!" %>

Applies to

Server Object

See Also

Requirements

Platforms: Windows 2000 with IIS 5.0 installed, Windows XP with IIS 5.1 installed, Windows Server 2003 family with IIS 6.0 installed

Platform SDK Release: February 2003
What did you think of this topic?
Order a Platform SDK CD

Comments:


file: /Techref/language/asp/obj/ref_vbom_seromexe.htm, 6KB, , updated: 2008/5/16 15:35, local time: 2024/3/29 00:19,
TOP NEW HELP FIND: 
3.229.123.80:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.piclist.com/techref/language/asp/obj/ref_vbom_seromexe.htm"> Server.Execute</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .