Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



Remarks: ASP Server Object Execute Method

The Server.Execute method provides a way to divide complex applications into individual modules. You can use Server.Execute to run ASP code on another page, returning to the original page when the code has finished executing.

By employing the Server.Execute method, a library of .asp files can be developed and then called as needed. This approach is similar to server-side includes, with the only major difference being that Server.Execute allows you to dynamically call an .asp file. Because Server.Execute is an ASP method rather than an HTML comment, it can be used to conditionally execute scripts and avoid including huge include files. Server-side includes are executed prior to any ASP code and thus can’t be executed conditionally.

Server.Execute does have some potential drawbacks, which are listed below. In many situations, though, using Server.Execute is a better choice than using server-side includes.

Potential drawbacks to Server.Execute:



ContentsPreviousNextIndex