isthisthingon
IS-IT--Management
I know someone here will have the solution to my problem. I have created some ASP pages that all work fine. I have included code that will make sure the user is logged in to prevent users from typing in the direct url adn bypassing the login.
The code on the top of all my working as pages are working just fine:
<%@ Language=VBScript %>
<%Response.Expires = -1 %>
<%Response.ExpiresAbsolute = Now() - 1 %>
<%Response.AddHeader "pragma", "no-cache" %>
<%Response.AddHeader "cache-control", "private" %>
<%Response.CacheControl = "no-cache" %>
<%
Response.Expires = -1000
Response.Buffer = True
Response.Clear
%>
<!--#include file="logincheck.asp"-->
<html>
<head>
<title>Welcome To Our Site :: <%=Your_UserName%></title>
<meta http-equiv="Content-Language" content="en-us">
etc ......
This code on my newly created page does not work. Please help:
<<%@ Page Language="VB" %>
<%@ Import Namespace="System.IO" %>
<script language="VB" runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
Dim strPath As String = "./uploads/"
Dim myDirInfo As DirectoryInfo
lblPath.Text = strPath
Dim strCompletePath As String
strCompletePath = Server.MapPath(strPath)
myDirInfo = New DirectoryInfo(strCompletePath)
dgFileList.DataSource = myDirInfo.GetFiles()
dgFileList.DataBind()
End Sub
</script>
<!--#include file="logincheck.asp"-->
<html>
<head>
etc.....
The code on the top of all my working as pages are working just fine:
<%@ Language=VBScript %>
<%Response.Expires = -1 %>
<%Response.ExpiresAbsolute = Now() - 1 %>
<%Response.AddHeader "pragma", "no-cache" %>
<%Response.AddHeader "cache-control", "private" %>
<%Response.CacheControl = "no-cache" %>
<%
Response.Expires = -1000
Response.Buffer = True
Response.Clear
%>
<!--#include file="logincheck.asp"-->
<html>
<head>
<title>Welcome To Our Site :: <%=Your_UserName%></title>
<meta http-equiv="Content-Language" content="en-us">
etc ......
This code on my newly created page does not work. Please help:
<<%@ Page Language="VB" %>
<%@ Import Namespace="System.IO" %>
<script language="VB" runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
Dim strPath As String = "./uploads/"
Dim myDirInfo As DirectoryInfo
lblPath.Text = strPath
Dim strCompletePath As String
strCompletePath = Server.MapPath(strPath)
myDirInfo = New DirectoryInfo(strCompletePath)
dgFileList.DataSource = myDirInfo.GetFiles()
dgFileList.DataBind()
End Sub
</script>
<!--#include file="logincheck.asp"-->
<html>
<head>
etc.....