vu******@gmail.com wrote:
so if I have 4 pages I normally "include" now, you suggest to
combine them into one page each within a sub?
Not at all. I am saying there is almost never a benefit to including the
same file twice in the same script. To extend my example to your original
one, instead of this...
dim id : id=123
<!-- #Include File="file.asp" -->
id=321
<!-- #Include File="file.asp" -->
....use this:
<!-- #Include File="file.asp" --(with Sub defined)
DoStuff 123
DoStuff 321
what is "inefficient" about my method above? i understand that
may not be the best way, but i want to know how it make things
worse.
The parser will fetch a copy of the included file for each #include
statement and splice it into the script before parsing a sigle line of
VBScript. Your approach could add a tremendous amount of redundancy.
As for your concerns about the length of code, my suggestion actually
shortens it.
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.