No you can not do this. The include files are processed first, so the contents of header.html and
hq-table.asp (and all of the others) will be rendered to the page. After this your ASP processed, its just not going to work
Change your approach:
1. I would place all of the code in all of your included files into a one file called functions.asp
making sure all of thier individual contents are inside subroutines as described in 2-6 below.
or you could do this
2. change header.html to header.asp and place all its contents inside a subroutine. EG myHeaderInfo()
3. place all of hq-table.asp inside a subroutime. EG myHQTableInfo()
4. place all of losangeles-alerts.asp inside a subroutime. EG myLosangelesAlerts()
5. place all of sandiego-alerts.asp inside a subroutime. EG mySandiegoAlerts()
6. place all of denver-alerts.asp inside a subroutime. EG myDenverAlerts()
7. now change your code to this:
Code:
'Note - If you use approach 1 (which is my suggestion) you would only need to include one file here of course
<!--#include file="header.asp"-->
<!--#include file="hq-table.asp"-->
<!--#include file="losangeles-alerts.asp"-->
<!--#include file="sandiego-alerts.asp"-->
<% If trim(rshq("hq_total")) = 0 Then
call myHeaderInfo()
call myHQTableInfo()
%>
</html>
<% elseif trim(rslosangeles("losangeles_total")) <> 0 Then
call myLosangelesAlerts()
elseif trim(rssandiego("sandiego_total")) <> 0 Then
response.write "alerts found"
call mySandiegoAlerts()
elseif trim(rsdenver("denver_total")) <> 0 Then
call myDenverAlerts()
end if %>