This is what I'm trying to setup:
page1.aspx
<%
'Declare main form variable
Dim page_id As String = "login" 'Static test variable
'Dim page_id As String = trim(Request.Form("page_id")) 'Dynamic variable to be used
%>
<%
'***LOGIN PAGE***
If page_id = "login" Then
%>
<%
End If
%>
page2.aspx
<%
'Declare variables
'Dim page_title As String
Dim page_description As String
Dim page_content As String
'Response.Write("test") 'TEST
'Page title
Dim page_title As String = "Login Page"
'Page description
page_description = "This is the login page."
'Page content
page_content = "This the content for the login page."
%>
page3.aspx
<%@ Page Language="
VB" ContentType="text/html" ResponseEncoding="iso-8859-1" aspcompat="true" Debug="true" %>
<%
<%
Response.Write("<title>" + page_title + "</title>")
%>
Resulting Error
Compilation Error
Compiler Error Message: BC30451: Name 'page_title' is not declared.
...and when I add <% Response.Write("test") %> to page2.aspx, and comment out the <% Response.Write("<title>" + page_title + "</title>") %>, I don't receive that error and the "test" does get written out. So I know that the page setup is working. I'm just not sure why the last display page (page3.aspx) is not seeing the variable from the SSI.
I'm using this setup so that I can have one SSI that contains other SSI's that actually contain each page's data. I'll then pull each of the page's data using <%Dim page_id As String = trim(Request.Form("page_id"))%> on page1.aspx.
If anyone could let me know what I'm doing wrong, it would be great. Thanks.
KWilliams