Wednesday, December 22, 2010

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.
Execute(Path)


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 code page 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!
--- Welcome.asp ---
Company Name
<% AcceptLang = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") Lang = Left(AcceptLang, 2) Server.Execute(Lang & "Welcome.asp") %>


--- EnWelcome.asp ---
<% Response.Write "Welcome to my Website!" %>


--- DeWelcome.asp
<% Response.Write "Willkommen zu meinem Website!" %>

No comments:

Post a Comment