Last post Jan 17, 2008 11:18 AM by danish321
May 02, 2006 03:50 PM|blancomario|LINK
I am converting a classic ASP application to a .NET 2.0 application and I am having problems trying to figure out how to pass parameters when making the HTTP call.
In my classic ASP I have the following code
strSend = "fields="&returnFields&"&pernr="&eIDs
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "POST", "http://mypioneer.phibred.com/ews/post", False
xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xml.Send strSend - where I am passing the parameters
In the ASP.NET page I have coded so far
myHttpWebRequest.Method = "post"
myHttpWebRequest.ContentType = "application/x-www-form-urlencoded"
I can figure what method to use so I can pass the strPostData as the parameter like it was done in the classic ASP sample above.
I appreciate your help.
May 02, 2006 08:33 PM|joteke|LINK
you would get the request stream with call to GetRequestStream and then using the returned stream, you'd write the params.
Oct 03, 2006 08:46 AM|marafacs|LINK
i have an asp page,with the username & password,and i want from my .net web application to POST data to the login page,and then get the response of that page.....how can i get that response......and check for it.
Jan 17, 2008 11:18 AM|danish321|LINK
Hi blancomario .
Dim strPostData As
String = "fields=" & strFieldInfo &
"&username=" & strUsername
Dim myHttpWebRequest As HttpWebRequest = WebRequest.Create("http://mypioneer.phibred.com/ews/post")
after building the post data then write it on the URL like below given code.
Hope this helps [:)]