Ask a Question related to ASP Database, Design and Development.
-
Manohar Kamath [MVP] #1
Re: Creating a Collection Variable ??
Not with VBScript, but you can use an Array to hold the elements.
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Adam Knight" <aj.knight@optusnet.com.au> wrote in message
news:e4jjhXYZDHA.2336@TK2MSFTNGP09.phx.gbl...VBscript.> I have create a number of VB script classes. I want to add instances of
> these classes to a variable to
> create something resembling a collection. From their i will execute a for
> each x in myinstances statement.
>
> Can anyone give some insight into how this may be accomplished in>
> AK
>
>
Manohar Kamath [MVP] Guest
-
Persisting collection data of a webcontrol when leaving the collection editor in VS2005
Hi folks, I'm developing a WebControl, that has got a property that's supposed to return a collection of data. Whenever I try to populate the... -
Creating variable using loop
Ok the first part of my code has a loop that loops 1-5 then i want it to set session variables but i don't know how to go about doing this.. i want... -
Creating a panel with a collection property -- NEED HELP
Hello everybody, I've been working lately on making my own tabstrip control because I couldn't find anything that works the way I want it. But now... -
Creating client variable
I'm trying to lear out scope variables here but I'm having a hard time grasping the concept. I want to create a v take the quantity and unit price... -
Creating a new control collection
I have an aspx page that has many nested controls. For example I have Panels that contain text boxes. There is also text boxes on the page itself.... -
Adam Knight #2
Re: Creating a Collection Variable ??
Set tbl = New Site_Table
tbl.Table_Align = "center"
tbl.Table_Border = "0"
tbl.Table_Width = "90%"
tbl.Table_Name = "mail"
tbl.Table_Data_Source = rs
Session.Contents.Item("Table") = tbl
If I do This: I get this error:
Session object, ASP 0185 (0x80020003)
A default property was not found for the object.
/connect/admin/mail_table.inc, line 23
If I do this:
arrTable(0) = tbl
I get this error:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method
/connect/admin/mail_table.inc, line 16
Can Anyone see another approach that will work !!!
Adam Knight Guest
-
Adrian Forbes - MVP #3
Re: Creating a Collection Variable ??
> Session.Contents.Item("Table") = tbl
By using Session("Table") = tbl you are trying to store a
value so it assumes you mean a property of tbl such as
Session("Table") = tbl.Table_Name
But as you did not provide a property (.something) it
assumes you mean the default property, but you have not
flagged anything as being the default property so it
doesn't know what to add to the Session.
If you want tbl itself stored, as an object, then you use
Set
Set Session("Table") = tbl
Note, however, that you can't store VB Classes in the
Session.
Adrian Forbes - MVP Guest
-
Adam Knight #4
Re: Creating a Collection Variable ??
Is their any way i can store vb classes in a variable so i can interate
through it like a collection.
Can it be done with an array some how ?
AK
Adam Knight Guest
-
Mark Schupp #5
Re: Creating a Collection Variable ??
Try a Scripting.Dictionary object.
However, some of this thread shows an attempt to put the objects into a
session variable. It is my understanding (could be wrong) that script
objects cannot be stored in session variables and go out of scope when the
ASP page ends.
--
Mark Schupp
--
Head of Development
Integrity eLearning
Online Learning Solutions Provider
[email]mschupp@ielearning.com[/email]
[url]http://www.ielearning.com[/url]
714.637.9480 x17
"Adam Knight" <aj.knight@optusnet.com.au> wrote in message
news:e4jjhXYZDHA.2336@TK2MSFTNGP09.phx.gbl...VBscript.> I have create a number of VB script classes. I want to add instances of
> these classes to a variable to
> create something resembling a collection. From their i will execute a for
> each x in myinstances statement.
>
> Can anyone give some insight into how this may be accomplished in>
> AK
>
>
Mark Schupp Guest



Reply With Quote

