Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Application Object Or Variable!

Reply
Thread Tools

Application Object Or Variable!

 
 
Arpan
Guest
Posts: n/a
 
      07-24-2005
The following code exists in a Global.asa file:

----------------------------------------------
<%
Set Application("Thing")=Server.CreateObject("THINGDOE R.THINGY")
%>
----------------------------------------------

Will the above code snippet


create a non-object Application variable named "Thing" & place it in
the Contents collection of the Application object?

-----OR------

create an Application object named "Thing" & place it in the
StaticObjects collection of the Application object?

Thanks,

Arpan

 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      07-25-2005

"Arpan" <> wrote in message
news: ups.com...
> The following code exists in a Global.asa file:
>
> ----------------------------------------------
> <%
> Set Application("Thing")=Server.CreateObject("THINGDOE R.THINGY")
> %>
> ----------------------------------------------
>
> Will the above code snippet
>
>
> create a non-object Application variable named "Thing" & place it in
> the Contents collection of the Application object?
>
> -----OR------
>
> create an Application object named "Thing" & place it in the
> StaticObjects collection of the Application object?
>
> Thanks,
>
> Arpan
>


It will create an application variable and set it to an object. This is not
considered wise unless the object is designed specifically for a
multi-threaded environment.

If you want the object in the staticobjects collection you will need to use
an <object> tag in global.asa to create it (again, make sure it is designed
for this)>

<object id="thing" progid="THINGDOER.THINGY" runat="Server"
scope="Application"></object>

--
Mark Schupp




 
Reply With Quote
 
 
 
 
Arpan
Guest
Posts: n/a
 
      07-26-2005
Thanks Mark

Regards,

Arpan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
Application/Object reference not set to an instance of an object Andrew ASP .Net 1 08-08-2005 10:25 PM
Winform Application Configuration Deleted by Application lhak ASP .Net 0 10-23-2004 11:47 PM
COM object accessing asp Application object mrrrk ASP .Net 1 12-19-2003 09:37 AM
How to inherit a base form in all application forms of an asp.net application varun varun ASP .Net 0 07-03-2003 08:58 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57