
| email this FAQ to a colleague
Q: Please explain the three types of server-side includes. A:- <!--#include file="page.asp"-->
- server.execute("page.asp")
- <script src="page.asp" runat="server"></script>
1 is great for encapsulating code that you'll re-use often - for instance,
functions and objects. #include the file with the function or object
definition in it, and use it in the page as needed. 2 is great for snippets of code that should be run, as opposed to just
included and called later. Server.Execute gives you access to all of the
POST and GET variables from the calling page, so that's very convenient if
you have reusable code that needs those environment variables, and it's not
convenient to further encapsulate the code as a function or object. 3 is good if you need to include code in a different language than the rest
of your page - say, if you've got a bit of JScript code you'd like to use in
your VBScript page. - Wade Armstrong | Articles | | | | | | | | | | | Aug 3, 2000 - Recursive Functions | | A function that calls itself repeatedly, satisfying some condition is
called a Recursive Function. Using recursion, we split a complex problem into its single simplest case.
The recursive function only knows how to solve that simplest case. You'll see the difference
between solving a problem iteratively and recursively later. [Read This Article] [Top] |
|
|