473,382 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Rusty on the ASP. Array Question

I've been doing ASP.NET for the past few years and have gotten spoiled and
now find myself in a situation where I need to make some changes to an old
classic ASP page. The problem is that there is a VB script function that
populates an array. There are some dropdown boxes on the page that cause the
page to reload. When it does reload, it causes the function that loads the
array to fire again and I don't want it to. I want to hold the original
array and reuse it instead. Again, being rusty in classic ASP, what are my
options for doing this and how? I'm used to having my session state in
ASP.NET. Any code samples would be greatly appreciated.

Thanks in advance!
Aug 16 '06 #1
3 1604
David Hearn wrote:
I've been doing ASP.NET for the past few years and have gotten
spoiled and now find myself in a situation where I need to make some
changes to an old classic ASP page. The problem is that there is a VB
script function that populates an array. There are some dropdown
boxes on the page that cause the page to reload. When it does reload,
it causes the function that loads the array to fire again and I don't
want it to. I want to hold the original array and reuse it instead.
Again, being rusty in classic ASP, what are my options for doing this
and how? I'm used to having my session state in ASP.NET. Any code
samples would be greatly appreciated.
Session state exists in classic ASP. Pretty much the same syntax is used
as used in .Net. Just look at the msdn documentation if you need a
refresher:
http://msdn.microsoft.com/library/en...f33a651779.asp
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Aug 16 '06 #2
Thanks Bob! I actually got it right after I posted. I am filling the array
the first time and then just holding it in a session variable for the rest
of the pages life.

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcomwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
David Hearn wrote:
>I've been doing ASP.NET for the past few years and have gotten
spoiled and now find myself in a situation where I need to make some
changes to an old classic ASP page. The problem is that there is a VB
script function that populates an array. There are some dropdown
boxes on the page that cause the page to reload. When it does reload,
it causes the function that loads the array to fire again and I don't
want it to. I want to hold the original array and reuse it instead.
Again, being rusty in classic ASP, what are my options for doing this
and how? I'm used to having my session state in ASP.NET. Any code
samples would be greatly appreciated.
Session state exists in classic ASP. Pretty much the same syntax is used
as used in .Net. Just look at the msdn documentation if you need a
refresher:
http://msdn.microsoft.com/library/en...f33a651779.asp
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Aug 16 '06 #3
On Wed, 16 Aug 2006 08:21:46 -0500, David Hearn <Da*********@shawinc.com>
wrote:
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcomwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>David Hearn wrote:
>>I want to hold the original array and reuse it instead. Again, being
rusty in classic ASP, what are my options for doing this and how?
Session state exists in classic ASP. Pretty much the same syntax is
used as used in .Net. Just look at the msdn documentation if you need
a refresher:
http://msdn.microsoft.com/library/en...f33a651779.asp

Thanks Bob! I actually got it right after I posted. I am filling the
array the first time and then just holding it in a session variable
for the rest of the pages life.
It probably bears mention that Arrays stored in the Session object are
copied wholesale each time you access them. You will most likely want to
save the copy in a variable in the interest of performance.

--
Justin Piper
Bizco Technologies
http://www.bizco.com/
Aug 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: buda | last post by:
Hi, I've been wondering for a while now (and always forgot to ask :) what is the exact quote from the Standard that forbids the use of (&array) (when x >= number_of_columns) as stated in the FAQ...
11
by: Geoff Cox | last post by:
Hello, I am trying to get a grip on where to place the initialization of two arrays in the code below which was created using Visual C++ 2005 Express Beta 2... private: static array<String^>^...
28
by: anonymous | last post by:
I have couple of questions related to array addresses. As they belong to the same block, I am putting them here in one single post. I hope nobody minds: char array; int address; Questions...
13
by: Jack B | last post by:
I'm using Access 2002 to create a database for a small opera company that my wife is involved in, and I'm more than a bit rusty because I haven't created a new Access database since about 1999. ...
46
by: C C++ C++ | last post by:
what is an escaping variable?
23
by: Raz | last post by:
On Wed, 30 Apr 2008 21:54:37 GMT, Erik Wikströ As I said, I will find the link again. His knowledge of C++ is just fine. ...
4
by: mab464 | last post by:
I have this code on my WAMP server running on my XP machine if ( isset( $_POST ) ) { for($i=0; $i<count($_POST);$i++) { if ($ans != NULL ) $ans .= ", " . $_POST ; // Not the first...
1
by: Sam | last post by:
Hi there. I hope this code is standard C. I think it is. Anyway, I haven't used C in a Looooooong time and am a little rusty on pointers. I am wondering why "buff" is a pointer to a pointer...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.