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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get web form input send to .dll?

Status
Not open for further replies.

EugenePaliev

Programmer
Jul 18, 2001
537
0
0
UA
Hello!

Really need to know how to get values from web from passed to .dll

Here is the situation. User fills and sends web form. Form action is some.dll. In VB I need to go thru form fields values and insert it into DataBase.

In ASP I know how to do it - Request.Form("formName") - but don't know how to do it in Visual Basic...

Will appreciate ANY help :)) Good Luck! :)
 
If your using a WebClass and trying to pull information from the page, the UserEvent is the way to do it.
On the page itself, you have to pass the values with a document.url statement in the script area:

document.url="ASPName.asp?WCI=PageName&WCE=EventDescription" & textbox.value & "|" & listbox.value & "|"


In the dll, you have to have the page defined and in the UserEvent, grab the data from the eventname.


Private Sub PageName_UserEvent(ByVal EventName As String)

Dim strProcess As String
Dim intStartPosition As Integer
Dim lngPosition As Long

strProcess = Mid(EventName, 1, 5) 'this is the length of the WCE= value from the document.url line. If you have
'mulitple document.url lines on the same page, then you will want to define
'each one with a different name of the same length. That way you can run
'the specific code for that document.url.


'this code will read each value from the document.url line. The pipes are used for the vbtextcompare functions.
'the first start position is one greater than the WCE= value.

intStartPosition = 6
ReadFirstValue = InStr(intStartPosition, EventName, "|", vbTextCompare)
gstrVerStore = Mid(EventName, intStartPosition, (lngPosition - intStartPosition))

intStartPosition = lngPosition + 1
lngPosition = InStr(intStartPosition, EventName, "|", vbTextCompare)
ReadSecondValue = Mid(EventName, intStartPosition, (lngPosition - intStartPosition))



I hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top