473,473 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ASP Objects and COM COmponent

I have following ActiveX DLL code which accesses the Controls on an asp page
using request object. Can somebody tell me the difference and between these
2 methods (Load() and Load2()). Which one is more efficient.

Load2 usese ObjectContext and Load uses scriptingcontext. Whats the
difference.

------------------------------------------------------------------------------
Dim ASPsc As ScriptingContext

Public Function Load() As Variant

'Dim req As ASPTypeLibrary.Request
Dim scObj As ScriptingContext
Set scObj = ASPsc

x = CStr(scObj.Request("name"))
y = CStr(scObj.Request("LName"))

x = x + y

Load = x

End Function

Public Sub OnStartPage(ASP_Scripting_Context As ScriptingContext)

'Set global variable so we can reference
'scripting context in other functions and subs
Set ASPsc = ASP_Scripting_Context

End Sub
Public Function Load2() As Variant
Dim req As ASPTypeLibrary.Request

Dim objContext As ObjectContext
Set objContext = GetObjectContext()

Set req = objContext("Request")

x = CStr(req("name"))
y = CStr(req("LName"))

x = x + y

Load2 = x

End Function
Mar 15 '06 #1
0 933

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

Similar topics

2
by: Marek Malowidzki | last post by:
Hi all, I am writing a component that exposes a C++ library as a .NET component. The approach is somewhat automatic: every library C++ class has its managed C++ counterpart that keeps a pointer...
9
by: Relaxin | last post by:
Is it possible to CREATE (not use) COM objects with C#? If so, can you point in the right direction? Thanks
38
by: Radi Radichev | last post by:
Hi! I'm making a database application and i heard from a friend that it is more proffecional and easy to do this with bussines objects. Can anyone tell me where i can find more info on bussines...
1
by: Stewart Rogers | last post by:
Hi all, @ my work place, we have been using COM+ for business objects for a while even though our COM+ components are VB 6.0 components and as such we did not make use of any of the COM+...
8
by: vvenk | last post by:
Hello: I just wrote my first ASP.Net application. It worked fine on my machine and when I put into production, the ASP.Net process reaches 50% quite fast and then the system does not work...
2
by: John Wilson | last post by:
I have an application that can access data both locally and through web services (it may be working in a disconnected mode). I have defined my data objects (e.g. ObjectA) in a separate component...
0
by: albean | last post by:
I I have a number of VB COM components used in ASP pages that access some intrinsic ASP objects. Basically we would get the context from COMSVCSLib and from there get the ASP Request and Response...
2
by: grawsha2000 | last post by:
Greetings, I am developing this N-tier business app. The problem I'm facing is when I try to pass business objects (employees, dept..etc) from business tier to data tier,i.e., the add method in...
0
by: Juan Zamudio | last post by:
Hi all, i have a COM+ component that works great from ASP.NET but in ASP the objects are not released in Windows 2003, the same code runs ok on my testing machine (Windows XP), I'm using the...
29
by: Jerry Spence1 | last post by:
I'm rather confused as to whether something should be disposed of, or not. What is the general rule? How can you be sure of doing the right thing? I've heard about disposing unmanaged resources but...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.