Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and Component

Status
Not open for further replies.

sefafo

Programmer
Aug 28, 2003
36
CO
Hello..!!
I've been learning how to build dll's in Vb lately
what I want to know, is how can I send an Html Form to a component. Y know how to send individuals elemements based on request , but I want to recive the entire form in the componente to do all the request proccessing there,

I hope you understand me since my english is a little poor.

Thanks so much!!!!!
 
First, set a reference in the vb project to the ASP environment. Then, you can pass the request object right into ASP:

Public Sub processHTML(myRequest as Request)
Dim myVariable as String
myVariable = myRequest.Form("myField")
End Sub

The syntax is probably bad, but you get the idea.
 

Follow these steps:

In the html form set the action property to an ASP page where you will instantiate your VB component.

In the VB Dll set a reference to the following libraries
COMSVCS type library
Microsoft ASP object type library
( i don't remember the name of these libraries quite that well)

In your VB Dll include the following code

Dim objContext As COMSVCSLib.ObjectContext
Dim objRequest As ASPTypeLibrary.Request

Private Sub Class_Initialize()
Set objContext = GetObjectContext()
Set objRequest = objContext("Request")
End Sub

and then you can use objRequest just as you would use the intrinsic ASP request object and process the HTML form through your VB Dll.

Good Luck!!
Sweta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top