[thelist] ASP String Concatenation vs. Response.Write
Warden, Matt
mwarden at odyssey-design.com
Mon Feb 26 16:21:07 CST 2001
> > From: "Warden, Matt" <mwarden at odyssey-design.com>
> >
> > You could also do this on start up of the application using the
> > global.asa file. That way, you wouldn't have to burdon one user per
> > reboot with the original rendering time.
>
> wouldn't it be once per timeout? assuming it's an application that
> is accessed less frequently than timeouts are set?
I'm not aware of the timeout in Application-level variables, but I would
assume it is relatively high, if there is one at all.
> either way, got some sample global.asa code? i rarely use
> global.asa, but clearly this would be a handy case...
I'm a tad rusty, but here goes:
SUB Application_OnStart()
strOut = "<html><head><title>Dan is the man!</title></head>"
strOut = strOut & "<body>"
strOut = strOut & "Hello, World!<br>"
strOut = strOut & "X-evolt: l33t hax0rz 0wn j00!!!!<br>"
strOut = strOut & "sgd uses frontpage!<br>"
strOut = strOut & "</body></html>"
Application("page1") = strOut
END SUB
Of course, you could add a bunch of DIVs and CSS positioning if you want...
Then, on page1.asp:
<%
Application.Lock
strOut = trim(Application("page1"))
Application.Unlock
if not strOut="" then
Response.Write strOut
else
' do something else... report it
' or regenerate page and stuff it back into Application
' i dunno when this would happen, unless they're is a timeout
end if
%>
--
mattwarden
mattwarden.com
More information about the thelist
mailing list