G
Guest
I have a following structure that I am using with array list:
Private Structure arrayliststruct
Public Name As String
Public value As String
Public type As String
End Structure
and following function to format arraylist the way I want and calling it
from button click event:
Private Function formatarray(ByVal inarray As ArrayList, _
ByVal inName As String, _
ByVal initem As String, _
ByVal initemtype As String)
Dim arrayparam As arrayliststruct
arrayparam.Name = inName
arrayparam.value = initem
arrayparam.type = initemtype
inarray.Add(arrayparam)
Return inarray
End Function
I have follwoing code in button click event
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click
Dim inarray As New ArrayList
inarray = formatarray(inarray, "Email", "(e-mail address removed)", "String")
inarray = formatarray(inarray, "Name", "My Name", "String")
' then I want to pass this code to web serivce that accepts arrary list
Dim postEv As New testev.wsTEST
postEv.Credentials = Net.CredentialCache.DefaultCredentials
postEv.PreAuthenticate = True
postEv.PostExtEvent("Test", "Source", inarray(2))
End Sub
I don't know how to pass arraylist to a webservice.
please help:
Private Structure arrayliststruct
Public Name As String
Public value As String
Public type As String
End Structure
and following function to format arraylist the way I want and calling it
from button click event:
Private Function formatarray(ByVal inarray As ArrayList, _
ByVal inName As String, _
ByVal initem As String, _
ByVal initemtype As String)
Dim arrayparam As arrayliststruct
arrayparam.Name = inName
arrayparam.value = initem
arrayparam.type = initemtype
inarray.Add(arrayparam)
Return inarray
End Function
I have follwoing code in button click event
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click
Dim inarray As New ArrayList
inarray = formatarray(inarray, "Email", "(e-mail address removed)", "String")
inarray = formatarray(inarray, "Name", "My Name", "String")
' then I want to pass this code to web serivce that accepts arrary list
Dim postEv As New testev.wsTEST
postEv.Credentials = Net.CredentialCache.DefaultCredentials
postEv.PreAuthenticate = True
postEv.PostExtEvent("Test", "Source", inarray(2))
End Sub
I don't know how to pass arraylist to a webservice.
please help: