Well that depends on a few things. You could create a form with the data and
post it to the third party, but I would look into WebRequest/Response. Here
is an example I have snipped, it may need to be changed to work. Also check
this site out.
http://west-wind.com/presentations/dotnetWebRequest/dotnetWebRequest.htm
Public Shared Function mgGetWebcontent(strWebSite as string, strWebPage as
string, strPostData as string, Optional intContentType as int32 = 0,
Optional httpFile as httpPostedFile = nothing) as string
Dim mgWebRequest As HttpWebRequest
Dim mgWebResponse As HttpWebResponse
Dim strText As String
Dim mgStreamReader As StreamReader
Try
mgWebRequest =CType(WebRequest.Create(strWebSite &
strWebPage),HttpWebRequest)
mgWebRequest.timeout = 90000
mgWebRequest.CookieContainer = new cookiecontainer()
dim k as int32
Dim siteUri As New Uri(strWebSite)
for k = 0 to HttpContext.Current.Request.Cookies.count - 1
'add your cookies here
dim ck as cookie = new cookie()
ck.name = HttpContext.Current.Request.Cookies(k).name
next k
mgWebRequest.UserAgent =
HttpContext.Current.Request.Headers("User-Agent")
mgWebRequest.Accept =
HttpContext.Current.Request.Headers("Accepts")
mgWebRequest.headers.add("Cookie",HttpContext.Current.Request.Headers("Cooki
e"))
if strPostData.length > 0 or not httpfile is nothing then
mgWebRequest.Method = "POST"
select case intContentType
Case = 1 'file post
' separate function snipped out will post if you need it
Case else
mgWebRequest.ContentType = "application/x-www-form-urlencoded"
mgWebRequest.ContentLength = strPostData.length 'length
Dim mgStreamWriter As new
StreamWriter(mgWebRequest.GetRequestStream())
mgStreamWriter.Write(strPostData)
mgStreamWriter.Close()
end select
else
mgWebRequest.Method = "GET"
end if
mgWebResponse = CType(mgWebRequest.GetResponse(),HttpWebResponse)
' you may not need the next part if you don't need the response cookies
and text
mgWebResponse.cookies =
mgWebrequest.CookieContainer.GetCookies(mgWebrequest.RequestUri)
mgStreamReader = New StreamReader(mgWebResponse.GetResponseStream())
strText = mgStreamReader.ReadToEnd()
dim i as int32
for i = 0 to mgWebResponse.cookies.count - 1
'add cookies to response
dim hc as httpcookie
hc = new httpcookie(mgWebResponse.cookies.item(i).name)
hc.expires = datetime.now.addyears(50)
hc.path = mgWebResponse.cookies.item(i).path
HttpContext.Current.Response.AppendCookie(hc)
next i
mgStreamReader.Close()
return strText
Catch
'catch processing snipped
end try
End function
"Beryl Small" <ber
(e-mail address removed)> wrote in message