?
Solved

Defining a Session varible in the globa.asa file (easy)

Posted on 1998-09-15
5
Medium Priority
?
259 Views
Last Modified: 2013-12-25
I have the following code in my globa.asa file
<script LANGUAGE="VBScript" RUNAT="Server">
SUB Session_OnStart
      Session("Count") = 10
END SUB
</script>

then in a asp file I have the following code
<html>

<head>
<title>Ags Processor</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>
<%
      Count = Session("Count")
%>

<body>

<p>Processing Graph [ <%= Count %> ] </p>
</body>
</html>

I preview the asp file in a browser, and instead of count being 10, it "".  Help.

Keith
0
Comment
Question by:kjsmith3
  • 3
5 Comments
 
LVL 10

Expert Comment

by:MasseyM
ID: 1855051
Rather than using <%= Count %> use <% =Session.Count %>

0
 

Author Comment

by:kjsmith3
ID: 1855052
When trying that answer, get the following error.
0
 

Author Comment

by:kjsmith3
ID: 1855053
When trying that answer got following error.
Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Session.Count'

/cmnhome/AgsProcessor.asp, line 13
I believe you where suggesting this
<% Session("Count") %> which again return ""
0
 
LVL 28

Accepted Solution

by:
sybe earned 60 total points
ID: 1855054
i think the problem might be that your global.asa is not valid. That can happen when it is not in the right location. The global.asa should be in the root of your application, which is in the root of the virtual directory you have created for your application.

0
 

Author Comment

by:kjsmith3
ID: 1855055
It was in the right place, I rebuilt the machine and it seem to work.

Keith
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question