I have a simple website that I am putting together as an asp newbie. Typically, I use Coldfusion, in which variables can be set in the header and application page and called dynamically.
Ideally I would like my pages to display based on the conditions set in the header and other files. I think that I need to use conditional statements for my header and footer includes and well as my navigation. I am having trouble though calling the variables set on their respective pages.
For example, I am testing one page which I have name examples.asp. It should have the included header and footer files. The navigation also has conditions and javascript. I also want to have dynamic title displays. However, the file is not showing the header template. In coldfusion, I can set the header variables in my header files, and define the navigational elements in their
Can I set the variables equal to a value and then set then on their respective pages? Is this possible in ASP.
----Page for Header- Conditional Statement-----
Here's my basic statement for my header.
<%@ Language=VBScript %>
<%Option explicit%>
<%
Dim TitleStr
%>
<html>
<head>
<title><%=TitleStr%></title>
<link rel="STYLESHEET" type="text/css" href="/global/sf.css">
</head>
<body topmargin="2">
<%
DIM main
If main=1 THEN
%>
Header Content---Tables with Images for Day
<%
Elseif main=2 THEN
%>
Header Content---Tables with Images for Day
<%
End If
%>
End of Header File....
EXAMPLES.asp Page:
I am trying to call my header and footer based on the variables set.
<!--#include virtual="global/head.asp"-->
<%
TitleStr = "Southfive Examples"
%>
<%
main = 2
%>
CONTENT for Examples Page
<!--#include virtual="global/foot.asp"-->
Ideally I would like my pages to display based on the conditions set in the header and other files. I think that I need to use conditional statements for my header and footer includes and well as my navigation. I am having trouble though calling the variables set on their respective pages.
For example, I am testing one page which I have name examples.asp. It should have the included header and footer files. The navigation also has conditions and javascript. I also want to have dynamic title displays. However, the file is not showing the header template. In coldfusion, I can set the header variables in my header files, and define the navigational elements in their
Can I set the variables equal to a value and then set then on their respective pages? Is this possible in ASP.
----Page for Header- Conditional Statement-----
Here's my basic statement for my header.
<%@ Language=VBScript %>
<%Option explicit%>
<%
Dim TitleStr
%>
<html>
<head>
<title><%=TitleStr%></title>
<link rel="STYLESHEET" type="text/css" href="/global/sf.css">
</head>
<body topmargin="2">
<%
DIM main
If main=1 THEN
%>
Header Content---Tables with Images for Day
<%
Elseif main=2 THEN
%>
Header Content---Tables with Images for Day
<%
End If
%>
End of Header File....
EXAMPLES.asp Page:
I am trying to call my header and footer based on the variables set.
<!--#include virtual="global/head.asp"-->
<%
TitleStr = "Southfive Examples"
%>
<%
main = 2
%>
CONTENT for Examples Page
<!--#include virtual="global/foot.asp"-->