I want to include a header file on one of my pages depending on the result of a query string. i.e.
then i get 0 as expected and I get 1 if I set it as one. All fine so far...
If I view the source of the document when it is 1 the include is there and it isn't if it is 0....Still fine...
Only problem is the menu is not actually displayed. If I do away with the if statement and just include the file regardless of the querystring then the menu is displayed. Is there a reason why I would not be able to only include a file depending on this querystring?
----------------------------------------------------------------------
Need help finding an answer?
Try the search facilty ( or read FAQ222-2244 on how to get better results.
Code:
<%
if request.querystring("Test")="1" then
response.write "<!-- #include file=""../includes/header.asp""-->"
end if
%>
[code]
This header file is basically a menu that will be hidden depending on a set number of arguments which in turn will set the querystring to 0 or 1.
If I set the querystring as 0 and do
[code]
response.write request.querystring("Test")
If I view the source of the document when it is 1 the include is there and it isn't if it is 0....Still fine...
Only problem is the menu is not actually displayed. If I do away with the if statement and just include the file regardless of the querystring then the menu is displayed. Is there a reason why I would not be able to only include a file depending on this querystring?
----------------------------------------------------------------------
Need help finding an answer?
Try the search facilty ( or read FAQ222-2244 on how to get better results.